Quote from : The Disappearing Spoon: And Other True Tales of Madness, Love, and the History of the World from the Periodic Table of the Elements Book

Also unlike a planet, an electron—if excited by heat or light—can leap from its low-energy shell to an empty, high-energy shell. The electron cannot stay in the high-energy state for long, so it soon crashes back down. But this isn’t a simple back-and-forth motion, because as it crashes, the electron jettisons energy by emitting light.