Solar panels can still generate energy on cloudy days, but their output is reduced. They do not produce energy at night. However, energy storage systems like batteries can store excess power generated during the day for use at night. This secures a continuous power supply.