Solar Panels do work still when it's cloudy out.
Although when it's cloudy outside and the sun is not shining enough the solar panels may charge the batteries a bit slower than the would if it were sunny out.
Solar Panels work best when it's sunny outside and you get more power and charge from sunny days than you do on cloudy days.
But even when it's cloudy outside your solar panels will work to charge your solar panel batteries and provide you with some power.
Solar Panels will work with either direct or indirect sunlight to generate power.
Solar Panels are most effective when you have direct sunlight but they also are still pretty effective when the light is reflected or partially blocked by clouds.