Each atom is characterized by its electron configuration. Quantum theory, developed by Planck and Bohr in the early twentieth century, states that the energy of an atom can only have certain specific values. The energy of an atom can not vary continuously. It is quantified.
The energy level diagram is used to represent the energy states available in each atom.
When an electron is in an energy state, it emits nor absorbs radiation. A photon is emitted or absorbed when an electron transitions from one energy state to another.