Final answer:
We know the Sun rotates based on the observations of the Doppler effect on its spectral lines.
Step-by-step explanation:
We know the Sun rotates based on observations of the Doppler effect on its spectral lines. The Doppler effect causes a shift in the wavelength of light emitted by a moving object, and this shift can be observed in the Sun's spectrum. By analyzing the redshift and blueshift of the spectral lines, astronomers can determine that different parts of the Sun are moving at different speeds, indicating rotation.
Learn more about Sun rotation