When a gaseous hydrogen atom in its ground state is excited by an input of energy, its electron is 'promoted' from the lowest energy level to one of higher energy. The atom does not remain excited but re-emits energy as electromagnetic radiation. This is as a result of an electron 'falling' from a higher energy level to one of lower energy. This electron transition results in the release of a photon from the atom of an amount of energy (E = hn) equal to the difference in energy of the electronic energy levels involved in the transition. In a sample of gaseous hydrogen where there are many trillions of atoms all of the possible electron transitions from higher to lower energy levels will take place many times. A prism can now be used to separate the emitted electromagnetic radiation into its component frequencies (wavelengths or energies). These are then represented as spectral lines along an increasing frequency scale to form an atomic emission spectrum.

More Info: www.meritnation.com