As long as an electron is in a particular orbit, the electron can never lose its energy on its own.
When an electron is hit by a photon of light, it absorbs the quanta of energy the photon was carrying and moves to a higher energy state. So the electron moves to a different orbital where once again its own wavelength is in phase with its self.
Electrons, therefore, have to jump around within the atom as they either gain or lose energy. This property of electrons and the energy they absorb or give off can be put to an everyday use. It won’t ever lose energy if it continues to travel in the same orbit