The Doppler effect doesn't just apply to sound. It works with all types of waves, which includes light. Edwin Hubble used the Doppler effect to determine that the universe is expanding. Hubble found that the light from distant galaxies was shifted toward lower frequencies, to the red end of the spectrum. This is known as a red Doppler shift, or a red-shift. If the galaxies were moving toward Hubble, the light would have been blue-shifted.