Due to some law about entropy, efficient processes are necessarily reversible. That's why electric motors - some of the most efficient machines ever invented - are also generators.
You want an ordinary diode to allow current to flow easily when it senses light? Simple: shine a powerful laser at the plastic-encased diode and it will melt the plastic and liquify the metal, fusing it together and allowing current to flow again. See? You just needed to try harder.
The logical question came up more than once: “can we use photovoltaic cells as a light?“. Pretty sure that‘ll work, too, but didn’t try because stuff was expensive then and we didn’t have any broken parts of cells at the time. They probably learned a few things on that day.
Why all solar panels are secretly LEDs (and all LEDs are secretly solar panels) - https://www.youtube.com/watch?v=6WGKz2sUa0w