When coral are somehow stressed by something, like temperature, light, or nutrients, the coral get rid of the symbiotic algae living in their tissue, which causes them to turn completely white.
The leading cause of coral bleaching is global warming. A warming planet means a warming ocean, and a change in water temperature. As little as 2 degrees Fahrenheit can cause coral to drive out their symbiotic algae.