So what causes the cool light show? When you crunch down on a candy, you shatter its sugar crystals. (Chemists define a solid crystal as a substance where each unit of matter repeats with a regular pattern. Think: salt or diamond.) Scientists believe that the structure of a crystal determines whether or not it will emit light when broken, a phenomenon dubbed triboluminescence.
Crystals in which every unit is symmetrically arranged around a center point don't tend to have this feature. But crystals that don't have this symmetry or are impure often do. This second class includes sugar. When you break a sugar crystal, one half of the crystal ends up with more electrons than the other. The electrons leap across the gap to the more positively charged side. There is a little bolt of lightning that shoots between the faces, says Arnold Rheingold, a professor of chemistry at the University of California, San Diego who has studied triboluminescence. (Recent research suggests that the sparks' energy is powerful enough to trigger chemical reactions such as combustion.)
In your mouth, these jumping electrons crash into nitrogen atoms, which is abundant in the air. The nitrogen briefly absorbs the energy from the collision and then spits out some energy in the form of ultraviolet light.
So far, all of this could happen with many hard, sugary candies. But we humans can't see ultraviolet light. What bumps certain sweet suckers into the world of blue, visible lightning is their flavoring. Wintergreen oil (or, in the case of the ones I just tried staring into the bathroom mirror in the dark, artificial flavor) will absorb the energy from the ultraviolet light and then emit blue light.
So next time you're focused on freshening your breath with a wintergreen treat, find a dark space and a mirror and let the lightning fly.
This answer is provided by Scienceline, a project of New York University's Science, Health and Environmental Reporting Program.
Live Science newsletter
Stay up to date on the latest science news by signing up for our Essentials newsletter.