For a-Si:H cells, because they are usually the top layer and because they are defective (doped) , they would absorb too much light without making collectible carriers if too thick. (So they are even a-SiC:H, a little higher bandgap to absorb less)
The drift lengths of holes are shorter than those for electrons. Since more electron/hole pairs are generated closer to the entrance of light, more holes can be collected the closer they are to the p-layer, i.e. if the light enters through the p-layer. The longer drift lengths of the electrons extended all the way across the i-layer to the further distant n-layer, and thus facilitate electron collection as well, so p-layer act as window layer. If the p layer is too thick Isc will suffer as a result of short wavelength generated carriers recombining
In most case p-layer thickness is larger than n-layer because, p-types substrate absorbs the maximum sunlight. n-type layer should be much thin because its' main function is to transmit the solar radiation to p-type layer.