In a joint letter to health professionals, the CMOs for England, Scotland, Wales and Northern Ireland called for increased awareness of the issue and reiterated previous government advice.
A quarter of people in the UK have low vitamin D levels putting them at risk of deficiency, which can cause bone problems such as rickets.
Uptake of a free vitamin D supplements programme has remained low despite repeated warnings of the potential harm.
All pregnant and breastfeeding women should take a 10 microgram once daily vitamin D supplement, the four UK health departments recommended.
All children aged six months to five years should take daily vitamin D drops to help meet their daily requirement of 7-8.5 microgram of vitamin D per day.
However, infants fed infant formula will not need this until they are receiving less than 500ml of infant formula a day, as these products are fortified with vitamin D.
Breastfed infants may need to receive drops containing vitamin D from one month of age if their mother has not taken vitamin D supplements throughout pregnancy, the CMOs advised.
Elderly people aged 65 years and over, and those not exposed to much sun, should also take 10mg daily.
GPs should be familiar with local arrangements for how patients can obtain 'Healthy Start' vitamins - free supplements that must be provided by PCTs or local health boards by law. Uptake of this scheme is currently low.
Scotland's CMO Sir Harry Burns said: 'Health professionals can make can make a significant difference to people’s health by making those at risk aware of how important it is to make sure they get enough vitamin D, and how they can get access to these important daily supplements.'
At-risk people include pregnant and breastfeeding women, children aged under 5 years, those over 65 years, people with low exposure to the sun and those with darker skin.