What happens to solar panels when it’s cloudy or raining?

Solar panels can also use indirect sunlight to generate energy. Although production may decrease, they will still work even when the sunlight is reflected or partially blocked by clouds. To much cloud cover may cause the inverter to turn off, bringing production to zero. 

Rain is actually be a good thing for the solar panels as it can clean away any dust or debris.