What information can astronmores gain from spectral lines of light

The composition of the sun.