By the early part of the 20th century, scientists knew that electrons are part of the atom and they reside in very specific energy levels.
When an electron is in its 'assigned' energy level of an atom, the atom is said to be in its ground state. If that same electron absorbs energy in the form of a photon and moves to a higher energy level, the atom is said to be 'excited'. If the excited atom emits energy, it will drop back to its original ground state.
Moving an electron to a higher energy level requires the input (absorption) of a "packet" of energy. Likewise, when the electron drops back to its ground state, or becomes stable again, that same "packet" of energy is given off (emitted). This "packet" has a very specific amount of energy called a photon and its energy (E) is given by: