Spectroscopy
Splitting light into its colours reveals a source's chemical composition, temperature and motion, which is how we know the Sun's makeup from 150 million km away.
Spreading light into its colours reveals features a picture cannot. A hot, dense body gives a smooth continuum; a thin hot gas gives bright emission lines; a cool gas in front of a bright source carves dark absorption lines. Each element has a unique pattern of lines. Joseph von Fraunhofer catalogued the dark lines in sunlight in the early 1800s, and in 1868 astronomers found a line in the Sun that matched no known element. It was helium, discovered on the Sun almost three decades before it was found on Earth.
From a spectrum an astronomer can read a star's temperature, chemical composition, density and magnetic field, and from the Doppler shift of the lines its velocity along the line of sight. Tiny periodic shifts reveal planets pulling on their stars; broad shifts reveal the expansion of the Universe. Nearly everything we know about distant objects comes from spectra.