Depends on country. I doubt you could ever run, say, Germany or Britain on locally produced solar power.
Considering the rate at which solar power is getting cheaper, I'd say a solar power based economy is within reach.
Chart here: Check out monthly/weekly energy production for 2014 https://www.energy-charts.de/energy.htm