In 2008, Prof David MacKay produced a book analysing the energy requirements of the world and looking at the balance between current needs and current potential sustainable energy production.
The full book can be found at www.withouthotair.com
Although it was written more than ten years ago, it is basically still correct. Since then the efficiency of PV panels has increased slightly, but also our energy consumption, particularly in all the global data centres, has increased.