A solar lantern works by converting the energy provided by the sun to electrical energy and then storing it until it is needed. To do this, solar lamps come with solar panels and rechargeable batteries. The solar cells in the panels absorb sunlight while the direct current generated is stored in the batteries.