One of the other ways we can tell, the temperature of the Sun is to examine the solar spectrum and look at what elements and molecules are present by the exact wavelength of the light that they absorb. We know, for example, how much energy it takes to remove 13 electrons from iron atoms -- and so when we see emission from the solar corona at a wavelength only produced by iron that has 13 electrons removed, we know how much energy that takes and what kind of temperatures that requires ( in that example, it is over 1,000,000 degrees Kelvin -- and a darn good clue that the corona is very hot.). for a beautiful image of the solar corona, see the most recent "picture of the week" from the Hinode mission's x-ray telescope:http://xrt.cfa.harvard.edu/xpow/wide_corona20100220_03UTti3.png
On the disk of the sun, different atoms and molecules absorb light at the particular wavelengths, and we use that information to tell the Sun's temperature. For example, most of the solar photosphere (the surface) is roughly 5,700K. That is too hot for most molecules -- they disassociate into their components ( i.e., water cannot stay as water, it separates into hydrogens and oxygen). But when we observe in the middle of a dark sunspot, we do see evidence that molecules exist there, which means that sunspots are cooler than the rest of the bright surface, by almost 1000K.
So, no, it is not guessing, is a lot of very interesting detective work.