Do the solar panels generate electricity even if it is not sunny?
Yes absolutely! Of course, the same amount of electricity is not generated as on a completely sunny day without clouds, but even during a cloudy day your solar panels can generate up to 50% of their maximum capacity during a sunny day.
Even on a rainy day you get energy, at best around 15% of the maximum capacity though. But your solar panels always generate energy as long as the sun is up, no matter if clouds or fog is blocking the sun.