To answer this question it helps if you know the difference between power and energy. The power rating of solar array is in kilowatts (kW) but the energy it produces is in kilowatt hours kWh. If you have a very sunny spring day you might get 4 hours of good quality sun on your panels. For a 1 kW solar system this gives you 4kWh:
ENERGY PRODUCTION = 1 kW x 4 h
ENERGY PRODUCTION = 4 kWh
If the next day was cloudy, you might get only get 1 hour of good quality sun on your panels. For the same system this would give you 1kWh:
ENERGY PRODUCTION = 1 kW x 1 h
ENERGY PRODUCTION = 1 kWh
So yes, a solar system still produces ‘energy’ when it is cloudy – just not to the same extent as when it is sunny.