How does the electromagnetic spectrum relate to astronomy?
Redshift and Hubble's Law is one way.
Due to the relative motion between other galaxies and our own (the Milky Way) the wavelength of electromagnetic waves emitted by the galaxies is increased due to a process similar to the Doppler Effect*. In the visible part of the spectrum red light has the longest wavelength. So due to this Doppler effect the wavelengths in the visible spectrum are shifted toward red (nb. they do not all get changed to red, just shifted toward red). Hence the phenomenon is called the redshift.
The redshift of galaxies indicates that the galaxies are moving away from the Milky Way (if the wavelength observed on Earth were smaller than expected then it would indicate the galaxies were moving toward Earth). We know whether light is red or blueshifted because the spectrum of light observed contains absorption spectra for various elements. Each absorption spectrum is unique. The observed spectra are compared with those produced in laboratories, this reveals the relative shift.
Hubble discovered a relationship between the distance of a galaxy and its relative velocity away. They were directly proportional. So a galaxy twice as far away is moving away twice as fast etc. It is strong evidence that the Universe is expanding.
*The cosmological redshift is different in that it is the result of the expansion of space between the source galaxy and our own expanding the light. Whereas the Doppler shifts we observe on Earth and within our own galaxy are the result of objects moving through space.