Since you said does instead of do I think it would be fruitless trying to explain it...
Solar panels are built with light-sensitive panels. These panels soak up the energy from the sun's light. This energy is changed to electric power. This power is stored in batteries to use whenever / wherever it is needed.