Hi
renbri - welcome to the Forum! The ultra-violet "sunbath" treatment was to prevent rickets, which is caused by a lack of Vitamin D. This vitamin is synthesised by the skin under ultra-violet light (i.e. sunlight). See for example the old photo that accompanies this
article.
In the post-war period, cod liver oil (rich in vitamin D) was more freely available and so in most areas this replaced the sunbaths. I remember in the 1950s being taken to the child welfare clinic (the upper floor of what is now the library building in Hillsborough Park) to be given regular health checks and a spoonful of cod liver oil (made palatable with orange juice). Rickets was rare in the 1950s, but it did occur for example in the children of West Indian families. This was because their traditional diet was fine in, say, Jamaica (where there was plenty of sunshine) but here in the UK the diet didn't include enough Vitamin D, and so a change in diet, vitamin supplements or UV light treatment was required.