Your solar panels don’t need sunshine, per se, to generate electricity as much as they need direct, unobstructed access to the sun’s UV rays. Your solar panels will still generate electricity during cloudy and rainy day — they just won’t produce as much energy as they do during clear days. Solar panels do not generate electricity at night since the sun is not out.