Even though the male has the ability, only the wingless female glows strongly, to attract the flying males. Each individual female has an adult glowing life of only a few weeks until she mates, since she dies soon after laying her eggs.
The light from glow worms is cold, and is a form of bioluminescence. It is far more efficient than most light sources we are familiar with. It is caused when a molecule called luciferin is oxydised to produce oxyluciferin, with the enzyme luciferase acting as a catalyst in the reaction.