Solar cells convert sunlight directly into electrical current.
Solar cells generate an electric current when hit by light.
Light is made up of tiny packets of energy called photons, which can displace the electrons bound up in the atoms of matter. Solar cells are designed so that when these electrons are displaced they are pulled away to provide a current, which can then power an electric device. To achieve this solar cells use semiconductor materials similar to those found in computer chips.
This direct conversion of light to electricity is known as photovoltaics. Most systems can convert about 15% of the light energy that hits them into electrical energy. If we were only to use solar cells to power the worlds' projected energy needs for 2030, this would require an area the size of Spain, distributed across the globe.
It is estimated that in 2016 solar photovoltaic electricity will cost 200 US dollars per megawatthour, which is roughly double the price of energy from burning coal. However the cost of solar keeps coming down, and it produces less pollution and damage to the environment compared to fossil fuels. Photovoltaic production growth has averaged 40% per year since 2000 and installed capacity reached around 15 gigawatts in 2008, which was about 0.1% of the world's energy supply then.
Higher efficiency solar cells are available, but they tend to be more expensive. To make the most of these more efficient solar cells, light can be concentrated onto them from a large area using mirrors.
This calculation comes from the Land Art Generator Initiative. 2030's energy needs (including transportation) would require 500,000 square kilometres of solar panels. To compare, there are 1.2 million square kilometres of farmland in China and 9 million square kilometres of desert in the Sahara.
This figure comes from the Annual Energy Outlook 2011 from the US Department of Energy. It is a prediction for a plant to be installed in 2016, taking into account all expenses, including construction and maintenance. See also Wikipedia:Cost of electricity by source for other studies. They do tend to vary widely.
http://en.wikipedia.org/wiki/Solar_power#Development_and_deployment. The world's average energy consumption in 2008 was 15 terawatts according to http://en.wikipedia.org/wiki/World_energy_consumption.
Jenny Nelson's 2003 book The Physics of Solar Cells is a standard textbook on this subject.
When light hits a metal it can displace an electron. This is the photoelectric effect.
In ordinary matter, excited electrons relax back to their original state. In a photovoltaic device, there is an asymmetry which pulls electrons away before they can relax and feeds them to an external circuit. The movement of charge generates a potential difference or electromotive force (EMF).
The "asymmetry" is created by having two types of material, called p- and n-type semiconductors.
p stands for positive (electron holes), n stands for negative (loose electrons). These disparities are created with doped crystalline silicon, doped with boron for p and phosphorus for n.
At the boundary an electric field is established by the difference in charges.
When electrons are then displaced by photons, near the junction they are pushed by the electric field, creating a current (if the full circuit is closed).
NASA: How does photovoltaics work?, but broken links and explanation is poor
NOVA: Inside a solar cell has a nice quick flash slideshow
In solid state physics, a band gap, also called an energy gap or bandgap, is an energy range in a solid where no electron states can exist. In graphs of the electronic band structure of solids, the band gap generally refers to the energy difference (in electron volts) between the top of the valence band (electrons bound to individual atoms) and the bottom of the conduction band in insulators and semiconductors. This is equivalent to the energy required to free an outer shell electron from its orbit about the nucleus to become a mobile charge carrier, able to move freely within the solid material. So the band gap is a major factor determining the electrical conductivity of a solid. Substances with large band gaps are generally insulators, those with smaller band gaps are semiconductors, while conductors either have very small band gaps or none, because the valence and conduction bands overlap.
Pure silicon forms nice crystals and is an insulator (4 electrons in outer shell which form covalent bonds in the lattice).
For N-type phosphorus or aresnic have 5, so one free electron is free to move around.
For P-type boron or galliumhave only 3 outer electrons, so there is a hole.
Either is now a moderately good conductor, a semiconductor.
But when you put them together something interesting happens at the junction.
A diode is the simplest possible semiconductor device. A diode allows current to flow in one direction but not the other. You may have seen turnstiles at a stadium or a subway station that let people go through in only one direction. A diode is a one-way turnstile for electrons. Hence symbol as triangle then vertical line.
Principally, it is the spectral breadth of sunlight that presents the greatest difficulty for efficient photovoltaic energy conversion. Useful power is delivered from the UV to near-IR and an efficient solar cell must collect as much of this incident light as possible. Conventional solar cells achieve this by indiscriminately absorbing photons above some threshold energy and discarding any excess energy as heat. This limits the efficiency of conventional photovoltaic convertors to 31%, the so called Shockley Queisser limit. See Wikipedia: Third generation photovoltaic cell.