Original: Spectroscopy can be used to derive many properties of distant stars and galaxies, such as their chemical composition, but also their motion by Doppler shift measurements.
Simplified: It can also be used to figure out how those objects are moving, using doppler shift.