Just like with sound waves, the Doppler effect also applies to light waves. Now, everyone knows that the speed of light is a constant (ie it cannot change), but nevertheless the appearance of light waves does change slightly depending on the relative speeds of the light source and the "eye".
This is how astronomers can tell that the universe is expanding: light from galaxies that are very far away is slightly "decompressed", like the sound of the fire engine as it races away from you. Light from the same kind of source but closer to us appears to have a slightly higher wavelength, like the fire engine as it passes right in front of you.
If the universe were contracting, the light from far-away galaxies would have a higher wavelength than nearby light, like the fire engine as it heads towards you.
