Magnetically Switchable Light-Matter Interaction in the Two-Dimensional Magnet CrI3