Both solar cells and plants harvest energy from sunlight. Photovoltaic solar cells collect sunlight and change it into electricity. Plant leaves gather sunlight and convert it into stored chemical energy. Both solar cells and plants are doing the same job, but they do it in different ways. There are similarities between the two approaches, though. One type of solar cell is even designed to be as similar to photosynthesis as possible.
Energy From Light
The energy in sunlight comes as little parcels called photons. Photons each carry a tiny bit of energy. The energy of a blue photon is higher than the energy of a red photon. That's important because both solar cells and plants can only absorb sunlight if the energy is just right. When a material absorbs sunlight, the photons in the light are transferring their energy to electrons in the material. Electrons can only absorb energy in a narrow range, so a given electron will only be able to accept energy from photons of specific colors in the light spectrum.
The Right Photon Energy
Both photovoltaics and photosynthetic plants are set up to absorb photons. In photosynthesis, evolution has produced chlorophyll, a molecule that will absorb the brightest sunlight. For photovoltaics, engineers have designed crystals where the electrons can use just the amount of energy contained in sunlight photons. In both cases, photons are absorbed by electrons, which take up the extra energy. An electron with extra energy is called an excited electron, or an electron in an excited state.
Handling Excited Electrons
Both plant and solar cells must handle excited electrons quickly, before they give up their energy and go back where they were before they absorbed their photons. In photosynthesis, the problem is solved by moving the electron from one molecule to another until it settles in a molecule that can store energy for a long time. In photovoltaics the excited electrons are whisked off into a circuit, where they either run something right away or are routed into a battery for storage.
There's a non-standard type of photovoltaic cell that tries to copy the way that photosynthesis works. Instead of moving an electron as quickly as possible through a crystal of identical atoms, the dye-sensitized solar cell absorbs energy in a dye molecule, then transfers the excited electron into another material located adjacent to the dye molecule. That keeps the electron from being able to lose its energy uselessly. When connected to a circuit, the electron makes its way through the second material without too much danger of losing its energy.