The light is produced by a chemical reaction in living organisms called bioluminescence. It may sound exotic, but it occurs in fish, jellyfish, sharks, clams, worms, shrimp and squid in oceans around the world. While bioluminescence is primarily a marine phenomenon, fireflies and fungi are two terrestrial organisms that utilize it as well. And in the days before refrigeration, it was not unheard of for meats to glow with bioluminescent bacteria in the pantry. Most bioluminescence in the ocean is blue-green in color because those wavelengths travel best through water, and because marine creatures' eyes are most sensitive to them.
Some creatures use bioluminescence as a flashlight to help see their surroundings.
Others use it to distract or confuse predators, to lure prey to their dark gaping mouths, or to attract mates. One family of fish called loosejaws emit near infrared light which only they can see. They use the night vision this light provides to see and capture unsuspecting prey. Whatever its values to marine creatures, it never fails to elicit in people the same childlike delight usually reserved for Christmas lights and fireworks.