And the third reason of fireflies lighting up is to warn each other of danger. Each species of firefly are different, preferring different habitats, and even having different colors of light. Some have a yellow flash, some a green flash, and some an amber flash. Some are primarily in open fields, others in wooded areas, and many prefer to be near water of some kind. Even the timing of their flashes is different, with some flashing primarily at dusk, while others flash when it gets very dark.
Fireflies live only a few short weeks.
During that time, they mature, mate, lay the eggs of their young and die. Some seem to think that a mature firefly may not even live long enough to eat, but others believe that they may feed on nectar. The larvae, which are also luminescent, have been seen feeding on earthworms and slugs. Fireflies are one of the great treats of summer nights.