The solar cells that we see on calculators and satellites are also called photovoltaic (PV) cells, which as the name implies (photo meaning "light" and voltaic meaning "electricity"), convert sunlight directly into electricity.
Photovoltaic cells are made of special materials called semiconductors such as silicon, which is currently used most commonly. When light strikes the cell, a certain portion of it is absorbed within the semiconductor material. This means that the energy of the absorbed light is transferred to the semiconductor. The energy knocks electrons loose, allowing them to flow freely.
PV cells also all have one or more electric field that acts to force electrons freed by light absorption to flow in a certain direction. This flow of electrons is a current, and by placing metal contacts on the top and bottom of the PV cell, we can draw that current off for external use, say, to power a calculator. This current, together with the cell's voltage (which is a result of its built-in electric field or fields), defines the power (or wattage) that the solar cell can produce.
Silicon has some special chemical properties, especially in its crystalline form. An atom of silicon has 14 electrons, arranged in three different shells. The first two shells -- which hold two and eight electrons respectively -- are completely full. The outer shell, however, is only half full with just four electrons.
What forms the crystalline structure (turns out to be important to this type of PV cell) when a silicon atom will look for ways to fill up its last shell, and to do this, it will share electrons with four nearby atoms. It's like each atom holds hands with its neighbors, except that in this case, each atom has four hands joined to four neighbors.
Phosphorous has five electrons in its outer shell, not four. It still bonds with its silicon neighbor atoms, but in a sense, the phosphorous has one electron that doesn't have anyone to hold hands with. It doesn't form part of a bond, but there is a positive proton in the phosphorous nucleus holding it in place. When energy is added to pure silicon, in the form of heat for example, it can cause a few electrons to break free of their bonds and leave their atoms. A hole is left behind in each case. These electrons, called free carriers, then wander randomly around the crystalline lattice looking for another hole to fall into and carrying an electrical current. However in the case of impure silicon with phosphorous atoms mixed, it takes a lot less energy to knock loose one of our "extra" phosphorous electrons because they aren't tied up in a bond with any neighboring atoms. As a result, most of these electrons do break free, and we have a lot more free carriers than we would have in pure silicon.
When light, in the form of photons, hits our solar cell, its energy breaks apart electron-hole pairs. Each photon with enough energy will normally free exactly one electron, resulting in a free hole as well. If this happens close enough to the electric field, or if free electron and free hole happen to wander into its range of influence, the field will send the electron to the N side and the hole to the P side. This causes further disruption of electrical neutrality, and if we provide an external current path, electrons will flow through the path to the P side to unite with holes that the electric field sent there, doing work for us along the way. The electron flow provides the current, and the cell's electric field causes a voltage. With both current and voltage, we have power, which is the product of the two.
Silicon happens to be a very shiny material, which can send photons bouncing away before they've done their job, so an antireflective coating is applied to reduce those losses. The final step is to install something that will protect the cell from the elements -- often a glass cover plate.
Sources: