how to design a solar panel to store energy and convert it into electrical energy?
solar panels change light into electricity, and do NOT store power.
You need a solar panel capable of enough power to keep the light on all night. And that may be 6 hours of sun and 12 hours of dark.
Then you need a set of batteries large enough to hold that energy. And a charge controller to regulate the charge into the batteries. And then a light that will operate on the battery voltage, say 12 volts.
This is probably not practical due to the large solar panel required, and the large batteries. But here is a few numbers. Assume a 100 watt light at 12 volts. Assume you get at least 6 hours of sun every day and the light will be on for 12 hours. That means the battery has to store 100*12=1200 watt hours. divide by 12 and that is 100 amp-hours, a large auto battery size.
Allowing for 20% losses in the battery and circuitry, that means you nee 1400 watt hours from the solar panel. Since it has 4 hours to operate, that means it has to deliver 1400/4 = 350 watts at 15 volts.
So there it is: 350 watt panel
100 amp hour battery
charge controller sized for above
100 watt light.
If you have to allow for a day with no sun, then you need more batteries. Two nights means 2400 watt-hours, two batteries, a larger charge controller and a 2800/4 = 700 watt panel.
cost: $400 for batteries
$200 for charge controller
$2000 for panel