Without major advances in battery technology which is unlikely to happen soon the energy/weight factor makes practical endurance/range aircraft impractical.
Hydrogen is a lot more promising but will need a very expensive refueling infrastructure. There are also questions about carbon neutral production of hydrogen, this would need a lot of green electricity.
There is a lot of work going on to solve the problems, my best guess is that light aircraft will use electric motors powered by hydrogen fuel cells.
All of this is unlikely to happen very quickly for light aircraft which have a service life of 40+ years so there will be no rush to replace these expensive assets with new technology. Avgas will be with us for decades more.