The answer is when an electron moves from a higher to lower orbital, energy is out as waves of light. This theory is called the wave theory of light. The current theory of light, industrialized by Niels Bohr and other scientists, shoulders that electrons may change from a higher energy level orbit to a lower energy level orbit. In doing so, small packages (quanta) of energy, called photons, are unrestricted.