It works both ways
--

As a supplemental answer to [this](https://electronics.stackexchange.com/a/449476/102305) and [this](https://electronics.stackexchange.com/a/449479/102305) excellent answer, the reverse process is also possible. Direct bandgap photodoiodes used in photovoltaic mode (it's the photovoltaic effect you are seeing here) they can also luminesce or glow with recombination light when excess e-h pairs are produced. 

This can be done with an applied electrical current, but as explained in the current answer to [Do III-V based photovoltaics “glow” (photo-luminesce) when illuminated but not loaded?](https://physics.stackexchange.com/q/270125/83380) the recombination light can be induced by a photocurrent within the junction, which itself is produced by incident sunlight.