In a solar cell, photons of the incident sunlight supply energy for excitation of electrons - a process which generates electron-hole pairs which can move under the influence of the electric field of the depletion region and give rise to current. For excitation of electrons to occur, the incident photons must have energy equal to or more than the band gap of the material used.
The solar radiation spectrum received by the earth has maximum intensity at wavelength nearly corresponding to photons of energy 1.5 eV. Materials like silicon (with band gap 1.1 eV) are thus suitable for use in solar cells, since their electrons can be excited by photons of energy 1.5 eV. However, there are also a number of other materials like PbS (where band gap is 0.4 eV) which have band gaps less than 1.5 eV - but are not as frequently used in solar cells as Si, or GaAs, are. My book addresses this question, and answers it by saying that in solar cells made of PbS, where incident photons' energy is a lot higher than the band gap, most of the photons incident are absorbed by the top layer of the cell and do not reach the junction (electron-hole separation, of course, needs to occur in the depletion region). I do not quite understand the rationale behind this answer, however. Why are photons of very high energy majorly absorbed at only the surface of the diode?
A possible reason (that I could think of) why PbS is not used could be that ionisation of the electron occurs instead - since the photon energy far exceeds the band gap, perhaps it is enough to excite the electron out of the crystal rather than just exciting it to the conduction level. Ionised electrons are lost by the diode and cannot possibly contribute to the circuit current.