Walking along the beach at night or sailing on a darkened sea, you will often see sparkling lights in the water. This is bioluminescence—the emission of visible light by an organism as a result of a natural chemical reaction. A remarkable diversity of marine animals and microbes are able to produce their own light, and in most of the volume of the ocean, bioluminescence is the primary source of light. Luminescence is nearly absent in freshwater, with the exception of some insect larvae, a freshwater limpet, and unsubstantiated reports from deep in Lake Baikal. On land, fireflies are the most conspicuous examples, but other luminous taxa include other beetles, insects like flies and springtails, fungi, centipedes and millipedes, a snail, and earthworms. This discrepancy between marine and terrestrial luminescence is not fully understood, but several properties of the ocean are especially favorable for the evolution of luminescence: (a) comparatively stable environmental conditions prevail, with a long uninterrupted evolutionary history; (b) the ocean is optically clear in comparison with rivers and lakes; (c) large portions of the habitat receive no more than dim light, or exist in continuous darkness; and (d) interactions occur between a huge diversity of taxa, including predator, parasite, and prey.
via Haddock, Moline and Case (2010), Bioluminescence in the Sea – Annual Review of Marine Science, 2(1):443.