Solar panels absorb energy from the sun, which is stored in a battery backup system. The battery powers the gate opener, ensuring that it can function even during power outages or periods of low sunlight. The energy generated from the solar panels is entirely renewable, making it an environmentally friendly option for gate automation.