A solar generator works when a solar panel converts sunlight into DC electricity that passes through the charge controller. The solar energy is stored in the battery, and thus a solar inverter generator turns the electricity into usable AC power.