What is the actual energy content of the Sun? Beside the energy released by nuclear fusion in the core, the Sun is a hot plasma of hydrogen and helium ranging from thousands to million of degrees. So how does that translate into energy ?
I have thought of an approach to find out how much energy a cubic meter of the Sun's core has by trying to calculate how much the "heat" in this cubic meter would equal in terms of energy.
I used the specific heat capacity for hydrogen and helium in order to see how much energy it would take to raise the temperature of a cubic meter of the Sun's core with density of $150\times10^{3}$ $kg/m^3$ to $15\times10^6$ $°K$, and that's what I got:
$Q$ = $C\times m\times T$ 
The heat capacity of hydrogen is 14 kJ/kg.K, so:
$Q$ = $14,000\times150*10^3\times15*10^6$ = $3.15\times10^{16}$ $J$
One problem I faced was determining the specific heat capacity of the hydrogen at higher temperatures. As found here, the heat capacity increases with temperature. I used the value at 250 °K, so the number I calculated might be lower limit of the correct value.
Now, was this specific heat capacity approach correct ?
If not, then are there any other ways to express the temperature of the Sun in terms of joules and energy ?
 A: Fun,  So you are asking about the thermal energy content of the sun?  
If we assume that all the hydrogen is dissociated. (single atoms) 
Then each atom has three degrees of freedom and carriers 3/2 kT of energy.
So count up the number of atoms at each temperature.... 
That will work until the atoms ionize.  Then there will be equal energy in all the electrons. (one from the H and two from He)  (I'll leave all the messy details to you :^)     
A: So a while ago I did a little project where I grabbed a "standard solar model" from this paper, which gives me some information that's useful for actually making an estimate.  (Unsurprisingly the link given to download the data has changed in the last ten years; I haven't sleuthed to see whether the data is still publicly available.)


*

*Only about 1.5% of the sun's mass is anything other than hydrogen and helium-4. This is true all the way out from the core to the surface. We'll assume that the sun contains only hydrogen and helium-4.

*All but the outermost 0.2% of the sun's mass (out to 90% of the sun's radius) is at a temperature $kT>54\,\mathrm{eV}$, which is the energy needed to turn $\mathrm{He^+}$ into $\mathrm{He^{2+}}$.  (This energy is four times the Rydberg energy.)  So somewhere above 99% of the sun's mass is completely ionized.

*The core temperature $kT\approx 1300\,\mathrm{eV}$ is much less than the electron mass, so the matter in the core is not relativistic.

*I'm going to assume that the electrons aren't degenerate; this tool (via this question) makes me think that's a pretty safe assumption for matter at the core with density $\rho \approx 150\,\mathrm{g/cm^3}$ and temperature $T \approx 10^7\,\mathrm K$.
In that case we can treat the core of the sun as a mixture of three non-interacting ideal gases, $\mathrm H^+$, $\mathrm{He}^{2+}$, and $\mathrm e^-$. As 
George Herold says, each ideal gas particle has mean kinetic energy $\frac32 kT$, so we'll want the number densities. The number density for hydrogen $n_\mathrm{H}$ is
$$
n_\mathrm{H} = \rho f_\mathrm{H}/{\mu_\mathrm{H} }
$$
where $\rho$ is the mass density, $f_\mathrm{H}$ is the hydrogen mass fraction, and $\mu_\mathrm{H} = 1\,\mathrm{gram/mole}$ is the atomic mass of hydrogen.  You have a similar expression for helium (with $\mu_\mathrm{He} = 4\,\mathrm{gram/mole}$). The electron number density, thanks to complete ionization, is just
$$
n_\mathrm{e} = n_\mathrm{H} + 2n_\mathrm{He}.
$$
Here's a figure showing temperature, mass density, and composition from my source above and number density as computed here:
Note that the horizontal scale (radius) is mass-weighted: you find about half the mass of the sun between 0.1 and 0.3 solar radii, so that interval takes up about half the horizontal axis.  This is purely a visualization technique, so that your eye isn't distracted by the (relatively) cool, diffuse outer layers of the sun.
To find the total thermal energy density, we have to integrate.  We find the thermal energy density 
$$
\epsilon = (n_\mathrm{H} + n_\mathrm{He} + n_\mathrm{e})\frac32 kT
$$
and the volume of a thin shell at radius $r$ is
$$
dV = 4\pi r^2 dr
$$
This integral $\int\epsilon\, dV$ gives me a total stored kinetic energy $E=3.09\times10^{41}\,\mathrm{J}$, of which about 95% is contained within half the sun's radius.
Now, if the sun had uniform density you could estimate its gravitational potential energy, the energy that was released when all the pieces fell together, as
$$
U_\text{uniform sphere} = -\frac35 \frac{GM_\text{sphere}^2}{R_\text{sphere}} = - 2.3\times10^{41}\,\mathrm J \text{ (uniformly dense sun)}.
$$
That's pretty close to our stored heat! We can do a little bit better since we actually know the density profile of the sun, by finding the potential energy released as you lay down each spherical shell,
$$
U = - \int_0^{M_\text{sun}} \frac{G M_\text{enclosed}(r)}{r} dM = -6.15\times10^{41}\,\mathrm{J}.
$$
This gravitational self-energy is roughly twice the stored kinetic energy --- which a real astronomer would have predicted as a consequence of the virial theorem.
A: At the end of your question you ask if there are other ways to express the temperature of the Sun in terms of energy. This is probably not exactly what you're looking for, but from Wien's law $\lambda_{\rm max}T=b$ ($\lambda_{\rm max}$ is the peak wavelength of the Sun's $\sim$blackbody spectrum, $b$ is Wien's displacement constant) and $E=\frac{hc}{\lambda}$, the temperature of the Sun's photosphere can be (and in some astronomy circles, often is) expressed as an energy, in this case about $2.4 \;{\rm eV}$ or $4\times10^{-19}\;{\rm J}$. This is of course a photon energy, and doesn't encode the total thermal energy content in any way, but it does encode the temperature.
A: The sun is more than a cloud of hot gas that is radiating energy. The sun also has energy stored in hydrogen "fuel" that will be "burned" through nuclear fusion into helium, releasing a lot of energy.
The sun is $2 \times 10^{30}$ kg, and about 70% hydrogen, so around $1.4 \times 10^{30}$ kg of hydrogen or $8 \times 10^{56}$ protons.
Let's estimate that all of this will undergo fusion. The dominant reaction is the p-p chain, which takes six protons (hydrogen nuclei) and produces a helium-4 nucleus and two protons. The two output protons can go on to further reactions, so the net reaction is 
$ 4 \mathrm{p} \rightarrow ^{4}\mathrm{He}$.
The mass of four protons is $4 \times 1.6726 \times 10^{-27}$ kg = $6.6905 \times 10^{-27}$ kg. 
The mass of a helium-4 nucleus is $6.6447 \times 10^{-27}$ kg. 
The difference becomes energy through $E=mc^2$!
Each reaction produces around $4 \times 10^{-12}$ J of energy.
The total energy you could get is then $\frac{1}{4} * 8 \times 10^{56} * 4 \times 10^{-12}$ = $8 \times 10^{44}$ J.
This is an awful lot more than is stored as heat at any one time! 
There are some caveats that make this only a rough calculation -- not all of the hydrogen will be fused, and there are other reactions that contribute. But it shouldn't be too bad!
