Enough solar energy later to charge battery?

Sounds as if you want to calculate the probability of the sun shining - if so you might have a look at the Bayesian integration.

There’s a lot to get your head round, but there’s an excellent howto here, complete with an interactive spreadsheet to do the maths for you.