Solar-powered and magnetic energy storage system