The short answer is no. Psilocybe magic mushrooms do not photosynthesize sunlight, therefore they don’t need it. Your magic mushrooms can’t have any direct sunlight as in most cases that would harm the colony and eventually kill it all.
Indirect sunlight and mushroom grow kits
Long answer: indirect sunlight or any kind of artificial light source is still needed for your colony if you want to grow a “beautiful flush”. That is because magic mushroom growth patterns are directly correlated with the light source they have. In short, they try to grow towards the direction of the light source. That’s why for most optimal results, some growers paint the bottom and the lower part of their fruiting chamber black. This way the fruiting bodies (mushrooms) don’t grow sideways or any other weird patterns and focus on an upward growth. Make sure that the growkit is not near a radiator/heat source as well.