The sun can provide all of humanity's power needs many times over.
Solar power cells convert sunlight into electricity, using the energy of speeding photons to create an electrical current within a solar panel.
Photons are created in the center of the sun by the fusion of atoms. It takes a photon about a million years to work its way to the surface of the sun, but once free it is hurled through space so fast that it reaches earth in just eight minutes - after traveling 93 million miles.
This tremendous energy from the sun is abundant, and has been powering the earth for billions of years - feeding plants, redistributing and refreshing water supplies and ultimately creating other forms of energy (such as fossil fuels) that largely power our civilization today.
Over the past several decades, scientists learned to harness this ancient energy source with more efficiency to do the work of non-renewable fuels - without pollution, noise or radiation, and not subject to economic whims that drive costs higher each year.
Today, our primary method of harnessing the sun is by way of solar cells that employ photovoltaic effect. Usually, when light hits an object the energy turns into heat, like the warmth you feel while sitting in the sun. But when light hits certain materials the energy turns into an electrical current instead, which we can then harness for power.
In a crystal, the bonds [between silicon atoms] are made of electrons that are shared between all of the atoms of the crystal. As the light gets absorbed, one of the electrons that's in one of the bonds gets excited up to a higher energy level and can move around more freely than when it was bound. That electron can then move around the in crystal freely, generating electric current.
Imagine you have a ledge, like a shelf on the wall, and you throw a ball up onto that ledge. That's like promoting an electron to a higher energy level, and it can't fall down. As photons pour in they bump the electrons into a higher energy state, where is stays until we collect it.
Newer materials use smaller, cheaper crystals, such as copper-indium-gallium-selenide, that can be shaped into flexible films. This "thin-film" solar technology, however, is not as good as silicon at turning light into electricity.
Today, photovoltaic technology only provides 1/1000th of the energy consumed in the United States. The potential for growth is tremendous!
See Also: The Anatomy of a Solar System.