Calcium imaging of neuronal activity (see, e.g.,
https://alleninstitute.org/education-resources/how-scientist...) is a thing, and has been for a while. It does something like what you said: neurons that have been genetically modified glow briefly, which can be picked up by microscopy. It has many advantages (and some drawbacks) compared to more traditional electrical recording techniques.