Researchers say concerns over melanoma may be prompting people to stay out of the sunlight, causing vitamin D deficiencies.

It’s the time of year when most of us yearn for long, sunny days.

Knowing that the sun’s ultraviolet rays can harm our skin, however, means that some of us may avoid sun exposure — something that one professional says could be even more harmful to our health.

David G. Hoel, Ph.D., a professor at the Medical University of South Carolina, told Healthline that the risks of sun exposure are only related to sunburn or excessive sun exposure.

“The message of sun avoidance advocated by our government, and some within the medical community, should be changed immediately to a recommendation of regular nonburning sun exposure for most Americans,” Hotel added. “The sun is essential for life and should be diligently pursued in moderation, not avoided.”

Read more: Get the facts on sunlight’s benefits »

Hoel’s review of studies, published in the journal Dermato-Endocrinology,highlights what he says is a growing body of evidence that moderate sun exposure is good for us.

Sun exposure can help humans reach proper vitamin D levels essential for overall health. Vitamin D also aids with absorption of calcium and phosphorus, which are vital for bone health.

The review looks at studies that have shown benefits to sun exposure other than vitamin D. The studies look at the benefits from sun and UV exposure on everything from Alzheimer’s disease and macular degeneration to multiple sclerosis and diabetes.

Overall, the authors say that the message of sun avoidance should shift to one that accepts nonburning exposure in order to attain healthy vitamin D levels of 30 ng/mL or higher in the sunny season.

The recommendation for daily vitamin D intake for children, teens, and adults is 600 international units (IUs) per day. Those younger than 1 year old need 400 IU a day, while adults over the age of 71 need 800 IU daily.

The researchers also say recommendations should promote the benefits of UV exposure beyond those of vitamin D.

Read more: The effects of vitamin D deficiency »

Dr. Orit Markowitz, an assistant professor of dermatology at the Icahn School of Medicine at Mount Sinai Hospital in New York, told Healthline that she disagrees with Hoel’s conclusion that any sun exposure is appropriate.

Markowitz noted that the American Academy of Dermatology (AAD) does not recommend getting vitamin D from sun exposure or indoor tanning because UV radiation can lead to skin cancer.

That is the most common cancer in the United States, and the number of diagnosed cases is still on the rise.

“Most dermatologists would argue that you can better increase vitamin D as well as maintain vitamin D levels through supplements,” Markowitz said.

Read more: Children breastfed after one year may need extra vitamin D »

So, are we getting too little sunlight?

The best way to know is to keep tabs on your vitamin D levels.

“People should not be ‘afraid’ of sun exposure, but use common sense [when going outside]. That is, do not overdo it. Don’t get sunburned,” said Marianne Berwick, Ph.D., a professor at the University of New Mexico, who is another author of the study.

“It is not key to always have sunscreen on,” Berwick told Healthline.

When the UV index is above three, then use caution — meaning don’t stay in the sun for too long. Stay in the shade or wear protective clothing.

“Sunscreen is fine and you only need 30, usually,” she said. “However, very fair people generally have a good sense of what SPF works best for them.”

Overall, Berwick stands by her report that people should not rely on supplements, and that “a small amount of sun exposure is far better for the reasons noted.”