Photovoltaics use the internal photoelectric effect to generate electricity from sunlight. Incoming light which is absorbed by a semiconductor crystal releases electrons from their bonding state. An electric field is then required to conduct them away from the solid state.
Solar cells have an n type layer which can emit electrons (emitter) and a p-type layer which can absorb electrons (base). At the boundary interface between the two layers (p-n junction) an electric field us formed, which separates the light-generated charge carriers. A voltage corresponding to the electric field is produced at the terminal contacts of the cell, meaning that current is able to flow as the contracts are connected to each other.
Many types of solar cell have been developed in laboratories to increase efficiency and reduce costs. Five of these are used commercially today and play the role in the market.