Solar panels only generate electricity in daylight and don't work at night because the photovoltaic process needs sunlight. Grid connection ensures continuous power when panels aren't generating, while batteries store daytime energy for evening use. 3 What are photovoltaic cells? 4 1. When sunlight hits the panels, electrons move within the semiconductor material, producing electrical energy. Modern photovoltaic (PV) systems are designed to make the most of available light, and with the right setup (like battery storage), your home can stay powered even after the. This means that while solar panels can technically use moonlight to produce some electricity, it's barely a hint., it will automatically be exported to the grid (and you'll get paid for it via a solar export tariff).