The emission spectrum can be used to determinate the composition of a material, since it is different for each element of the periodic table. For example, it is used to indentify the composition of stars by analysing the received light.
Interestingly, the emission spectrum of an element is the exact opposite of its absorption spectrum; that is, the frequencies emitted by a material when heated are the only frequencies that will be absorbed when it is lighted with a white light.
Thus, emissionspectra are produced by thin gases in which the atoms do not experience many collisions (because of the low density).
The emission lines correspond to photons of discrete energies that are emitted when excited atomic states in the gas make transitions back to lower-lying levels.
Emission or absorption processes in hydrogen give rise to series, which are sequences of lines corresponding to atomic transitions, each ending or beginning with the same atomic state in hydrogen.
Spectra can also be created by the interference of light waves, the phenomenon that makes the brightly colored patterns seen reflected from a compact audio disc and the halos often observed next to a bright, partly clouded Moon.
Emission lines are easy to produce in the laboratory simply by heating a low-density gas, allowing collisions to kick the electrons to higher energies.
The differences in stellar spectra, at least for main sequence stars, are caused almost entirely by differences in ionization (after all, if sodium is all ionized, the absorptions of neutral sodium will not be present) and the by the way in which the absorption efficiencies change with temperature.