Here's why:
* The Doppler Effect: Just like sound waves, light waves also exhibit the Doppler effect. When a source of light is moving towards us, the wavelengths of light are compressed, making them appear bluer (blueshift). Conversely, when a source of light is moving away from us, the wavelengths are stretched, making them appear redder (redshift).
* Hubble's Law: Edwin Hubble's observations showed that galaxies are generally moving away from us, and the farther a galaxy is, the faster it is moving. This relationship is known as Hubble's Law. The redshift of distant galaxies is directly proportional to their distance from us.
Therefore, when we observe a galaxy with a redshift, it tells us that the galaxy is moving away from us due to the expansion of the universe.