When an electron absorbs energy, it will move up from a lower energy level to a higher energy level, called the "excited state" of the negatively-charged subatomic particle. However, the absorbed energy is released within a small interval of time and the electron moves down to its "ground state."
The electrons of an atom are able to absorb particles of light called "photons" from outside sources of light energy, such as lamps, bulbs and lasers. The photons whose quantum energies equal the gap between the ground and excited state are the only ones that will be absorbed by the electron. When the electron emits the photon and jumps back to its ground state, a specific wavelength of light is radiated.