FYI solar cells would not make good light sources since the most common ones (silicon based) are indirect band gap. For LEDs (and lasers) a direct band gap material is required.
You are correct about the depletion region needing to be large for solar cells, but narrower is not necessarily better. This is because if you make the band gap super narrow (say 0.5eV) and most of your energy comes in as much higher energy photons (1eV+) you are discarding all of the energy besides that 0.5eV from those photons. The band gap is tuned to get the highest responsivity at wavelengths where the most energy is coming in if it is tuned at all.