What happens at night or on cloudy days?

Solar panels produce energy when the sun is shining. At night or when it’s cloudy, the system will use credits from excess power that was overproduced from the system during the day. This is the primary reason that on-grid solar solutions rely on the utility grid and net metering laws to provide supplemental power when the system isn’t producing.