text: Each gas has a unique set of spectral lines that serves as a spectroscopic fingerprint.  These lines, incidentally, are created through transitions of electrons from high energy states to low energy states; each transition has a unique amount of energy associated with it which translates to a photon of a particular wavelength.  Helium was discovered by subtracting out all the spectral absorption lines associated with known elements from the solar emmision spectrum, similar to the way an audio technician can enhance a vocal track by subtracting instrumental tracks one at a time.  Hope that helps!