Optics and Optoelectronics of Atomically Thin Magnets and Semiconductors