In solar cells there is a p-n junction. P-type semiconductor (for example CdTe) is often absorber layer because of its carrier lifetime and mobilities. In case of CdS/CdTe,* CdS is n-type window layer and everywhere it is said that it should be very thin and has large band gap – not to absorb any light and let it go through to the p-type absorber (that is why it is called a window layer).
But why should it be on top of the absorber layer and not below it?
If n-type layer is below, the light can hit the p-type absorber directly. I have some ideas that it is related to the distance between the place of absorption and p-n junction, but I am not sure.
Image by Alfred Hicks/NREL (source).
*A similar design is used in CIGS, CZTS and other thin film solar cell designs; this question applies to all of them - solar cells with a p-type absorber and an n-type window layer