Bioluminescence is caused by a chemical reaction that involves a light-emitting pigment called luciferin and an enzyme called luciferase. When these two substances react with oxygen, they produce light without creating heat, resulting in the glowing phenomenon seen in certain organisms such as fireflies, jellyfish, and some deep-sea creatures.