Temperature of the Sun's rays What is the temperature of the light that leaves the Sun towards the Earth and does it cool down during it's journey here ? If it doesn't cool down then how come it isn't frying the Earth ? Is it our atmosphere that is preventing it from doing so or does it cool down during it's trip here in space ?
The Sun's radiation spectrum is close to thermal at $T_\odot = 5778\,\mathrm{K}$. That means that that power output, given by the Stefan–Boltzmann law, is around $L = \sigma A T^4$, where $\sigma = 5.6704\times 10^{-8} \,{\mathrm{W}}/{\mathrm{m}^2\mathrm{K}^4}$ is the Stefan–Boltzmann constant and $A$ is its surface area:
$$L_\odot = \sigma(4\pi R_\odot^2)T_\odot^4 = 3.85\times10^{26}\,\mathrm{W}\text{.}$$
However, at the Earth's orbital radius $r = 1\,\mathrm{AU}$, this radiation is spread across a surface area of $4\pi r^2$, so the power incident on an Earth-sized sphere would be just
$$P = L_\odot\frac{\pi R_\oplus^2}{4\pi r^2}\text{,}$$
so approximating the Earth as a spherical blackbody, the equilibrium temperature is determined by its own thermal radiation balanced by this incident radiation:
$$\sigma(4\pi R_\oplus^2)T^4 = P\text{,}$$
which gives a surface temperature of
$$T =  T_\odot\sqrt{\frac{R_\odot}{2 r}} = 279\,\mathrm{K}\text{.}$$
Therefore, no special mechanisms are necessary to prevent the Earth from frying.

In reality, the Earth is not a blackbody because of its albedo and atmosphere, but its actual global temperature is not too far off from this estimate. The average surface temperature is close to $288\,\mathrm{K}$. Earth's atmosphere actually raises the average temperature, not lowers it.