"Firefly" is the common name for the nocturnal luminous insects belonging to the beetle family Lampyridae (order Coleoptera). There are over 2000 species of fireflies inhabiting the tropical and temperate regions. They range in size from 1/5 of an inch to one inch in length. Most fireflies found in the United States are about an inch or less in length. They have special light organs on the underside of the abdomen. It is reported that some adult fireflies do not eat. Others feed on pollen and nectar. Both male and female are luminous. The rhythmic flashes produced vary by sex and species. It is believed that the flashes are part of a signal system for attracting mates. Some scientists believe the flashing is a warning system to predators. However, frogs eat fireflies in prodigious amounts when available.
During summer months fireflies rest on plants or in trees during the day and fly around between dusk and midnight. It is reported that they prefer damp places. The firefly light is called a "cold light" because it produces almost no heat. It is produced when oxygen, breathed in through the abdominal trachea combines with a substance called luciferin in the presence of the enzyme luciferase, in special cells called photocytes.
Female fireflies lay their eggs in the soil. The eggs hatch about four weeks later into larvae. The larvae are carnivorous. The larvae sometimes glow also, and are commonly known as "glowworms," as are wingless adult females of certain Lampyridae.
Firefly eggs are also reported to glow. After hatching the larvae spend the summer eating and then dig small tunnels in which to overwinter. As the soil warms up in spring they emerge to eat again, pupate and eventually emerge as fireflies.
Unfortunately, I have not discovered a reference on the food sources of the various stages of lampyridae. Many sources list slugs and snails as a food source for the larval form but whether adult fireflies even eat is unclear.