Solar panels do not generate electricity at night since there is no sunlight. However, if you have a battery backup system, the excess energy generated during the day can be stored and used at night. Otherwise, you will need to rely on grid electricity or other backup power sources.