Spectroscopy is the use of light, sound or particle emission to study matter
. The emissions are, in many cases, able to provide information about the properties of the matter under investigation. The device often used for such analysis is a spectrometer, which records the spectrum of light emitted (or absorbed) by a given material, especially in analytical chemistry and physical chemistry fields, where the light can be used to determine the chemical composition of a substance because of signature spectral lines emitted by known elements.
Similar devices, called spectrographs, are frequently incorporated into major telescopes, and can similarly be used to identify the composition of stars and other astronomical bodies, based on the light they emit.
The picture shows the spectral lines from the sun, distributed to the public domain by the National Science Foundation.