It was estimated that the heat inside the core of the Sun inside around 15 000 000 °C - this value is extremely enormous. How did scientists estimate this value?
The composition can be determined by taking spectra. Additionally, the mass can be determined through dynamics. If you combine these two, under the assumption that the star is in a state of hydrostatic equilibrium (which means that the outward thermal pressure of the star due to fusion of hydrogen into helium is in balance with the inward tug of gravity), you can make statements about what the temperature and density must be in the core. You need high densities and high temperatures in order to fuse hydrogen into helium.
Remember what's happening: Temperatures are hot enough for hydrogen in the core to be completely ionized, meaning that in order to fuse these protons into helium nuclei, you need to overcome the electromagnetic repulsion as two protons come close (like charges repel). Below is a diagram of the process of one particular type of fusion (Proton-proton chain reaction).
The other fusion reaction which occurs at the cores of stars is called the carbon-nitrogen-oxygen (CNO) cycle, and is the dominant source of energy for stars more massive than about 1.3 solar masses. Below shows this process.
Hydrodynamic models of the Sun allow one method of estimating its internal properties. To do this, the Mass, radius, surface temperature, and total luminosity (radiative energy emitted)/s of the Sun must be known (determined observationally). Making several assumptions, e.g., that the Sun behaves as a fluid and that local thermodynamic equilibrium applies, the stellar equations of state can be used. Numerical methods are applied to these equations to determine the internal properties of the Sun, such as its central temperature.
A great example for how to work this problem your self can be found in the undergraduate text, 'An Introduction to Modern Astrophysics' by Carroll and Ostlie (Section 10.5). The FORTRAN code to run your own stellar model is included in Appendix H.
A comprehensive review paper on how stars of different masses evolve internally (e.g., with respect to T, P, etc.) that is worth reading is: http://adsabs.harvard.edu/abs/1967ARA%26A...5..571I
A very interesting historical overview of the development of the Standard Solar Model: http://arxiv.org/abs/astro-ph/0209080
This (admittedly dry) paper gives you a good idea of how well the 'standard' solar models estimate the internal properties of the Sun using helioseismology and neutrino measurements to help tie down their boundary conditions: http://adsabs.harvard.edu/abs/1997PhRvL..78..171B The answer is that they match incredibly well (>0.2% error)
These were the least technical (but still academically published) references I could find.
Here is a comprehensive page on the state-of-the-art in solar modelling and measuring the internal Sun using Helioseismology: http://www.sns.ias.edu/~jnb/Papers/Preprints/solarmodels.html (highly technical)
In general: you make models of the sun, and then you see which one agrees with all observations, and check which temperature this model predicts for the core.
A very simple model that gives a good approximation: fusion happens within a small volume in the core, and a part of the released energy is transported to the surface afterwards until it can escape as light. We know how much light the sun emits, and you can calculate the necessary temperature and density gradients inside that is required to transport this power and to keep the sun stable. Work from the surface inwards and you get an estimate for the core temperature.
Another nice approach is the fusion rate - this is known from the total power as well, and it can be compared to the fusion rate the sun would have at different temperatures.