In Morocco, in north west Africa, salt is being used to keep the lights on in the city of Ouarzazate at night time.
Mirrors focus the sun's heat onto special tubes filled with oil.
The heat from the tubes creates steam that then generates power during the day.
The heat from the mirrors is also used to melt the salt to a temperature of 500 degrees celsius - that's five times hotter than boiling water.
The salt can then stay hot for up to eight hours so it can carry on making the steam to generate even more power.