Definition
A solar cell is a semiconductor device that turns the light energy of sunlight directly into electricity, right where the light lands. There's no need to collect heat, boil water, and spin a turbine. Instead, particles of light knock electrons loose inside the material and push them along a wire.
Sunlight billiard balls knock electrons awake
Sunlight looks like a plain, bright beam. But it's actually a stream of countless tiny packets of energy called photons. When these photons pour down on a semiconductor layer like silicon, something interesting happens.
An electron that was sitting quietly bound to an atom absorbs an incoming photon. It's a bit like a still billiard ball starting to roll when another ball hits it. The difference is that the photon is absorbed by the electron and disappears. With the energy handed over, the electron breaks free from its atom. It doesn't leave the material. It just roams freely inside it as a free electron.
The general name for light giving electrons energy is the photoelectric effect. In the narrower case where electrons stay inside the material and build up a voltage, as in a solar cell, it's called the photovoltaic effect. This is the first step in waking up the sleeping electrons.
A one-way street for electrons
If freed electrons just scattered in every direction, you wouldn't get electricity. Electricity happens when electrons flow in an orderly line, all heading the same way.
To make that happen, a solar cell joins two different kinds of semiconductor. One is N-type, which has extra electrons. The other is P-type, which has empty spots for electrons, called holes. Where the two meet, they create an internal electric field. Think of it as a one-way slide that only pushes electrons in one direction.
Electrons freed by light slide down this slide toward the N-type side only. From there they travel through the wire connected outside, and that flow becomes the current that charges your phone or lights a lamp.
To be precise: it's not collecting heat
Many people think solar cells make electricity from the summer heat. They don't. A solar cell directly absorbs the energy of photons, not heat, and turns it into electricity.
In fact, when a panel gets too hot on a summer day, its efficiency drops sharply. That's because a higher temperature lowers the voltage the cell produces. For a typical silicon cell, output falls by about 0.3 to 0.5% of its rated value for every degree Celsius above 25°C. For a cell with 20% efficiency, that's roughly 0.08 percentage points lost per degree. That's why clear, cool days in spring or fall can sometimes produce more power.
Also, not all sunlight becomes electricity. Photons with too little energy pass right through without freeing any electrons. Photons with too much energy waste the extra as heat. This is one of the biggest reasons that the silicon cells in everyday use top out at around 20% efficiency. Losses from surface reflection and electrical resistance add to that.
Common misconceptions
The hotter and more sweltering the weather, the more electricity a solar cell makes.
Solar cells run on light, not heat. When the temperature gets too high, the voltage the cell produces drops, so efficiency actually goes down.
Where you meet it
The small brown strip on the corner of a pocket calculator is a solar cell that makes electricity from indoor lighting.
The big panels on a house roof or the wings of the International Space Station use sunlight to supply power.
In one sentence
A solar cell uses photons to wake up electrons, then sends them down a one-way path inside a semiconductor to make electricity.