How Solar or Photovoltaic (PV) cell works
Solar or photovoltaic cells convert the sunlight into electricity at the atomic level. Solar cell or Photovoltaic (PV) cells are a sandwich of at least two layers of different semiconducting materials made of Silicon. The two layers are commonly known as P- Type and N- Type which depending on the nature of impurities in the silicon. P- Type material contains added boron atoms as an impurity with a shortage of electrons (or abundance of positively charged electron holes). N- Type material contains added phosphorus atoms as impurities with a plenty of electrons.
Note: Silicon is known as a semiconductor, meaning that it shares some of the properties of metals as a conductor and some of those of an electrical insulator, making it an essential ingredient in solar cells. Let's see what happens when the sunlight strikes onto a surface of the solar cell.
Sunlight consists of a bundle of light or particles of solar energy called photons. When PV cell is exposed to sunlight, many of the photons are reflected, pass right through, or absorbed by the solar cell. When enough photons are absorbed by the N-type layer (electron-rich layer) of the photovoltaic cell, electrons get excited and are free to move in the semiconductor material. Where these two materials are in contact, an electrical field is created between the two layers of the cell, called the P-N junction. When PV cell exposed to the sunlight, this electrical field provides momentum and direction to light-excited electrons, which resulting in a flow of current when the solar cell is connected to an electrical circuit or load. Each solar energy cell produces only 1-2 watts.
It means the n-type and p-type silicon becomes positively and negatively charged, respectively, creating an electric field across the cell. As a semiconductor, silicon can act as an insulator, maintaining this imbalance.
Note: PV cell does not convert solar heat into electricity.