Does about half the energy in earth's atmosphere comes from the sun?

No. Essentially all of the energy in the earth's atmosphere comes from the sun. Tiny amounts come from geothermal (about 0.044%) and from human uses of nuclear energy, but the vast majority comes from the sun.