Solar panels will stop generating electricity at night but will still generate electricity on cloudy or rainy days, just not as much as on sunny days. To create electricity, your solar panels need direct sunlight, so whilst it doesn’t need to be a bright sunny day all the time, the more sun that hits your panels, the more electricity is produced.