A photovoltaic cell (PV cell) is an energy harvesting technology, that converts solar energy into useful electricity. The vast majority are silicon semiconductors, and interact with incoming photons in order to generate an electric current.
The physics of semiconductors requires a minimum photon energy to remove an electron from a crystal structure, known as the band-gap energy. If photon has less energy than the band-gap, the photon gets absorbed as thermal energy. For silicon, the band-gap energy is 1.12 electron volts. Since the energy in the photons from the sun cover a wide range of energies, some of the incoming energy from the Sun does not have enough energy to knock off an electron in a silicon PV cell. The longest wavelength (which corresponds to the lowest energy) that is capable removing the is 1.1 µm, this means that ~1/4 of the light from the Sun does not sufficient enough to create electricity.
The specific semiconductors used are called p-n junctions, which essentially work by creating an internal electric field due to an uneven distribution of charges. The voltage each cell creates is about 0.6 V, which is relatively small. When photons knock an electron free from its atomic shell, it can flow through this voltage (but won't always, see Efficiency below) and flow to a metal contact which can be connected to an external electric circuit. The PV cell is essentially a solar-powered battery, causing a current to flow just like a chemical battery would.
Efficiency is a design concern for photovoltaic cells, as there are many factors that limit their efficiency. The main factor, as mentioned briefly above, is that 1/4 of the solar energy to the Earth cannot be converted into electricity by a silicon semiconductor. From Figure 3 it can be seen that the visible light and ultraviolet light have sufficient energy, but a good portion of the most dominant incoming light cannot be used.
Even from the light that can be absorbed, there is still a problem. Any energy above the band-gap energy will be transformed into heat. This also cuts the efficiency because that heat energy is not being used for any useful task.
Of the electrons that are made available, not all of them will actually make it to the metal contact and generate electricity. This is because some of them will not be accelerated sufficiently by the voltage inside the semiconductor.
Because of the reasons listed, the theoretical efficiency of these PV cells is about 33%. Realistically this limit cannot be achieved because lots of the radiant energy will reflect off of the surface of the cell. This can be somewhat solved with the use of anti-reflection coatings, but even so the maximum efficiency achieved is about half of the theoretical limit, about 15%.
There are ways to increase this efficiency. First of all, using pure silicon can increase the efficiency from 15% to 18%, but this comes at an increased cost (read about the benefits and drawbacks of using pure silicon here). Another way to increase efficiency is by changing the construction of the semiconductor. A standard PV cell has one junction, called a "pn junction". By using different materials and multiple junctions, light that would otherwise generate excess heat as mentioned above can be made more useful. Some cells using this technology can achieve efficiencies up to 44%! This technology is basically using a stack of pn junctions each one attempting to grab the energy from a passing photon, which is how the limits are increased. This technology is very expensive however, and may have to be cheapened to be of practical use.