https://dercuano.github.io/topics/solar.html and in particular https://dercuano.github.io/notes/energy-storage-efficiency.h..., https://dercuano.github.io/notes/heliogen.html, and https://dercuano.github.io/notes/lithium-supplies.html. https://dercuano.github.io/notes/balcony-battery.html and https://dercuano.github.io/notes/the-suburbean.html explore the question at the household scale.
More recently, https://news.ycombinator.com/item?id=26219344 and https://news.ycombinator.com/item?id=26229595 explore this question in more detail, and https://news.ycombinator.com/item?id=26308189 explores specifically what it would cost for California to switch to an all-solar grid with only battery storage over the next decade.
David MacKay wrote a wonderful and highly accessible overview of the topic in 02009 as part of his excellent book, Sustainable Energy Without the Hot Air, which is specifically about sustainable energy in Britain. Unfortunately it needs to be updated—in particular, it doesn't consider utility-scale battery facilities at all—and he is sadly no longer in a position to update it. The license does permit third parties to provide an updated version, but he did not publish the source code. Still, here it is: https://www.withouthotair.com/c26/page_186.shtml
My fondest dream is that they'll stop dotting the countryside with those ridiculous pole-mounted "security" lights, and we'll be able to experience nighttime again.