In 1859 chemist Robert Wilhelm Bunsen (1811–99) and physicist Gustav Robert Kirchhoff (1824–87) discovered that the spectrum produced by passing sunlight through a prism could be compared with spectra produced by chemicals burned in the laboratory, and that this could show which chemicals were present in the Sun.
This one discovery led to all kinds of new branches of astronomy.
Spectroscopy was used to study the outer regions of the Sun during total eclipses (the only time that the Sun’s corona is visible). It was also used to study the composition of stars
Information on 19th Century Astronomy from the Royal Observatory