The energy levels within an atom are the specific energies which an electron can occupy in the atom. Electrons can reach higher energy levels by absorbing energy from their environment and will move down through levels when expelling said energy. This is known as relaxation and the byproduct of this stage is light. This occurs because electrons do not stay in excited states long and naturally return to a stable level.