Does it always have to be sunny to get solar energy? Could it be partly cloudy?
Sunny is best, but solar panels will still operate on cloudy days.
Sunny weather provides the highest output from solar panels as the incoming photos are not scattered. On a cloudy day, there are still some photons reaching the solar panels, but the efficiency and power output drops, by as much as 70%. During a very dark thunderstorm, the panels output will drop even further. And of course, at night the output will essentially drop to zero.
Another issue in northern climates is that snow can accumulate on solar panels and thereby reduce efficiency, or conversely, in desert locations fine sand can cover panels or damage them. Solar panels also operate best in cooler vs. warmer climates.
But its really not an individual cloudy day or two that impacts the economics of solar, its the average number of sunny days in a year that is important.