Helium, the second most abundant element in the universe, was discovered on the sun before it was found on the earth because of spectroscopy.
Pierre-Jules-César Janssen, a French astronomer, noticed a yellow line in the sun's spectrum while studying a total solar eclipse in 1868.
Astronomers at the time were especially interested in looking at solar prominences: clouds of superheated gas that rise from the Sun's surface in huge, blazing arcs.
In 1868, the only way astronomers knew how to view solar prominences required a solar eclipse to block the rest of the Sun's light. So Janssen set off to Guntur, India, with an instrument called a spectroscope, which uses a prism to separate light into individual wavelengths.
Sir Norman Lockyer, an English astronomer, realized that this line, with a wavelength of 587.49 nanometers, could not be produced by any element known at the time. It was hypothesized that a new element on the sun was responsible for this mysterious yellow emission. This unknown element was named helium by Lockyer.
Learn more about the element helium from these links:
education.jlab.org
www.rsc.org
www.forbes.com