Fireflies or lightning bugs produce a chemical reaction inside their bodies that allows them to light up. This type of light production is called bioluminescence and is shared by many other organisms, mostly sea critters. The main purpose of a firefly’s light is to attract mates. The males fly around while turning their lights on …