How much of the Earth's heat is produced by the Sun and internally?

This is actually a rather hard problem to work out, and even an approximation like the one below is probably inadequate.

It is often noted that, without an atmosphere with greenhouse gases, the surface temperature of the Earth from solar irradiation would be about 250 K or 40 degrees Centigrade colder than what we now enjoy. This is from a star 93 million miles distant with a photospheric temperature of 5770 K. The core of the earth, although it continuously increases from the center to the surface, has a mean temperature of about 4500 K and a radius of 2,500 kilometers. If we think of this as a mineature internal 'sun', then the total luminosity of this internal surface is

           2        4 L = 4 pi R  sigma T

where sigma = 5.6 x 10^-5so thatL = 4 x 3.141 x (2500 x 10^5)^2 x 5.6 x 10^-5 x (4500)^4or 1.8 x 10^28 ergs/sec.At the surface of the earth, by energy conservation, we still get the same amount of energy, but it is spread over a surface area of 4 x pi x (6500km)^2 or 5.3 x 10^18 square centimeters. So the energy flux heating the surface is about 340 Watts/cm^2. At the earth's distance from the sun of 147 million kilometers and a solar luminosity of 4 x 10^33 ergs/sec we get a flux of 1.8 Watts/cm^2. The interior of the earth contributes more than 99.5 percent of the total heating of the surface compared with the sun!

This answer, of course is quite wrong because it assumes that 100% of the internal energy is radiated to the surface. In fact, the internal heat source drives powerful convective currents in the mantle so that nearly all of this thermal energy is lost. At the surface, the actual heat flow is only about 0.075 watts/cm^2.

The bottom line is that of the total heat reaching the surface of the Earth of(1.8+0.075) = 1.875 watts/cm^2, only 0.075/1.875 = 4% is conbtributed by the Earth's internal heat. This, of course, will dominate everything else if the Sun were to magically vanish!