However, fireflies are not the only animals which can produce light. Light production in the ocean is very common. Marine plankton, jellyfish, even squid and fish have been seen to bioluminesce. Certain strains of bacteria are the most efficient light producers of all. Regardless of the type of animal, they all do it pretty much the same way, using enzymes and proteins.
Animals can use bioluminescence for a variety of reasons.
They use it to attract prey, or sometimes to frighten or confuse predators. Some animals may use it to attract a mate or others of its species. It can be used as camouflage or as a warning to stay away. The possibilities are endless. Bioluminescence is a wonder of nature.