The molecule, called nitric oxide, works by dampening inflammation, which causes itchy skin associated with the condition.
Scientists say their findings pave the way for new therapies which mimic the effects of the sun’s rays and could help patients avoid light therapy, which can have damaging side effects on the skin such as raising cancer risk.
Lead researcher Dr Anne Astier, of the Medical Research Council Centre for Inflammation Research at the University of Edinburgh, said: “Our findings suggest that nitric oxide has powerful anti-inflammatory properties and could offer an alternative drug target for people with eczema.”
Further studies found the chemical activates specialised immune cells called regulatory T cells, which act to dampen ongoing inflammation.
The University of Edinburgh team found patients with eczema saw the increased number of these cells in their blood following light therapy fitted with disease improvement.
Researchers say their findings could lead to new therapies for the condition, which affects around one in five children and one in 20 adults in the UK.
People with severe forms are often prescribed tanning lamps to help manage their symptoms, but these can cause skin burning, accelerated ageing and increased risk of cancer.
Professor Richard Weller, senior lecturer in Dermatology at the University of Edinburgh, said: “It is clear that the health benefits of sunlight stretch far beyond vitamin D and we are starting to fill in these blank spaces.”
The study is published in the Journal of Allergy and Clinical Immunology.