Hi,
We do it by tracking individual features as they move around the sun. It is pretty straight forward to get the general idea that the sun rotates. You can see it in the sunspot drawings Galileo did of the Sun (see
http://galileo.rice.edu/s...unspot_drawings.html - you can measure the rotation speed yourself!).
It is tricky, though, because features near the equator rotate a bit faster that features near the poles and some sorts of features, like sunspots, move a little faster than other kinds, like coronal holes. It takes a lot of careful data analysis to see those smaller effects. This clearly shows that the outer layers of the Sun don't rotate as a solid (like the Earth's surface), but are fluid (like Earth's atmosphere).
Best,
Terry