If we're going to get better at powering the planet with renewable energy, we need to get better at finding ways of efficiently storing that energy until it's needed – and scientists have identified a particular material that could give us exactly that.

The material is known as a metal-organic framework (MOF), in which carbon-based molecules form structures by linking metal ions. Crucially, MOFs are porous, so they can form composite materials with other small molecules.

That's what the team did here, adding molecules of the light-absorbing compound azobenzene. The finished composite material was able to store energy from ultraviolet light for at least four months at room temperature before releasing it again – a big improvement over the days or weeks that most light-responsive materials can manage.

"The material functions a bit like phase change materials, which are used to supply heat in hand warmers," says materials chemist John Griffin from Lancaster University in the UK.

"However, while hand warmers need to be heated in order to recharge them, the nice thing about this material is that it captures free energy directly from the Sun."

The azobenzene acts as a photoswitch – a molecular machine that responds to an external stimulus such as light or heat. Under ultraviolet light, the molecules change shape while staying in the MOF pore framework, effectively storing the energy.

Applying heat to the composite MOF material triggers a quick release in energy that itself gives off heat, which can then potentially be used to warm other materials or devices.

While the material still needs some work to be made commercially viable, it could eventually be used to de-ice car windscreens, or supply additional heating for homes and offices, or as a heating source for off-grid locations. Photoswitches like this also have applications in data storage and drug delivery.

"It also has no moving or electronic parts and so there are no losses involved in the storage and release of the solar energy," says Griffin. "We hope that with further development we will be able to make other materials which store even more energy."

While past research has also looked at storing solar energy in photoswitches, typically they need to be held in liquids. Switching to an MOF composite solid means the system is easier to contain and has greater chemical stability too.

Right now, more work is needed to get this MOF material ready for widespread use. While tests showed it could hold on to energy for months at a time, the energy density of the material is relatively low, which is one area the researchers are hoping to improve on.

The good news is that there are lots about the setup used in this research that can be tweaked and adjusted to try and improve the results – which will hopefully lead to another cost-effective and reliable way of storing energy that we can depend on.

"Our approach means that there are a number of ways to try to optimise these materials either by changing the photoswitch itself, or the porous host framework," says X-ray technician Nathan Halcovitch, from Lancaster University.

The research has been published in Chemistry of Materials.