Mealworms react to light – according to Dr. Balfuor of Princeton University and Dr. Carmichael of Brown University. In another experiment done in 1905, Dr. Loeb noted that the when worms are placed in a container near a window, they will move to the darker side of the receptacle. If the container is covered with dark blue glass, the result is the same. If the container is covered one half with red glass and the other with dark blue, they go to the part under the blue glass. These experiments were done in direct sunlight. They are stereotropic and negatively heliotropic.
Based from these observations, for a more acceptable breeding condition of mealworms. They should be kept in an opaque container (not glass) and should be placed in a shaded area.
Citation:
Balfour, C.E. and L. Carmichael. (1928). The Light Reactions of the Meal Worm (Tenebrio molitor Linn). The American Journal of Psychology. Vol. 40, No. 4 (Oct., 1928), pp. 576-584. https://doi.org/10.2307/1414336