Do moths die when they touch the light?
Also asked, can moths live without light?
Entomologists have found that moths are less attracted to artificial lights during the week of the full moon than they are during the new moon week, and this observation sparked yet another theory.
Besides, why do moths like light but only come out at night?
Moths don't 'like' light at all. The reason they fly maniacally around bulbs is that in the pre-electric world in which they evolved, they used the moon to navigate by night. By keeping the moon at a constant angle to the direction of their flight, they could ensure they travelled in a straight line.
Moths are more sensitive to some wavelengths of light -- ultraviolet, for example -- than they are to others. A white light will attract more moths than a yellow light. A moth's dark-adapting mechanism responds much more slowly than its light-adapting mechanism.