Why do solar cells have a window layer on top of the absorber layer and not below it? 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
 A: I think the point you are making is why isn't the n-CdS/p-CdTe junction inverted to be p-CdTe/n-CdS. As you say this would allow the "high mobility" CdTe layer (it's not really high mobility, it more that any carriers generated in CdS recombine instantly) to be placed first and absorb a little extra light. Something on the order of $7mA/cm^2$ of photocurrent is lost due to parasitic absorption in the CdS layer, so this would seem like a good idea.
I am not an expert on thin-film cells but I believe the problem boils down to suitable workfunction materials for the electrodes. If you invert the cell then you also need to have p-layer contact which is transparent. If the workfunction is a poor match then its possible to setup a space charge which prevent carrier collection.
Another option would be to do a n-CdTe/p-CdS design however I think there are problems with doping CdTe as a donor, or at least it can only be done to a low level ~$~10^{-14}cm^{-3}$, which will give you a small built-in field.
So in summary the design of the thin-film solar cell is probably evolved due to material constraints.
This is in an interesting question, I will look more into it and update. Hopefully this gives you some pointers until then.
A: When the light strikes the P-substrate, it excites an electron. This electron either is absorbed back into the P-substrate, or it can move into the N-substrate and gets absorbed there. Once the electron has moved into the N-substrate, due to the PN junction, the easier path to balance the charges is to push electrons through an external circuit. 
It makes more sense to generate excited electrons near the N-substrate, than to generated the excited electrons on the side away from the N-substrate. More excited electrons can transfer to the N-substrate if it is nearby.
A: I can't speak directly to this design, but can offer two general reasons for an overlayer.  First, it may be necessary to protect or passivate the junction material.  Second, a layer of appropriate thickness and index of refraction will reduce the overall reflectance, thus improving the collection efficiency of the device (solar cells are essentially a specialized type of solid-state detector, same as in a digital camera).
A: I would assume you also want the highest absorption at the P-N junction, so if there is the window layer on top, then the highest amount of light in the absober layer is right next to the junction, and should separate the carriers more efficiently, as opposed to having most of the light absorbed before the junction, and then having the carrier diffuse across the length of the absorber layer, potentially recombining during that process.
A: The physics of solar cells by Jenny Nelson pg 167-168 answers this.
I think what it is saying is that if a photon is absorbed close to the edge of the pn layer then there is a high chance that interface deformations between the semiconductor and the surrounding layers will promote charge recombination. So you want the e h pair to be made in the middle of the pn junction so that they are far away from each other when they get to the deformed interface. So a window n-layer will mean it can only be absorbed in the p-layer, far away from the edges. 
