Solar cells are large area p-n junctions. P-type solar cells consist of a thin n-type silicon layer (doped with phosphorus) over a much thicker p-type silicon layer (doped with boron). Electrical contacts are applied to both sides. The n-side is the front side facing the sun. It is given an antireflective coating, over which is pasted a clear adhesive which holds the front protective glass layer.Note: Don’t be surprised. This dope is legal and recommended, not by doctors, but by engineers.
Currently most of the crystalline solar cells are p-type. This is because of a lower cost of production. But performance wise, p-type solar cells have certain disadvantages compared to n-type solar cells, read more here https://sinovoltaics.com/learning-center/solar-cells/n-type-solar-cells/. There are two main reasons. Firstly, p-type material is created by doping with boron (trivalent). Boron undergoes some undesirable action with oxygen in the presence of light, which reduces efficiency of conversion. This is called Light Induced Degradation or LID.To understand the second disadvantage, note that sunlight breaks loose electron hole pairs. If this takes place in the p-type region, the electron is a minority carrier in this region. It risks getting absorbed by one of the surrounding holes which are the majority carriers. In this case the solar energy absorbed will be lost as heat, and contribute to heating up the cell. Our goal is to allow the electron to drift to the depletion region where it will be swept by the electric field to the n-type material, and on to the cathode. In other words, the diffusion length of minority carriers must be as long as possible. In the P-type cell this is less than the n-type. The n-typecell allows better diffusion length.It is estimated that once manufacture of n-type solar cells becomes cost effective, it will give better efficiency of conversion than p-type solar cells. For this reason a lot of research is currently going on to permit more cost effective production of n-type cells.Resources: