Sunbathing to reduce jaundice is the most common treatment for jaundice in folklore and in less developed parts of the world, and is even recommended by some doctors to parents. It is true that sun exposure can help reduce jaundice, but there needs to be adequate exposure of the body to the sun for it to work.
However, as newborns have delicate skin, direct sunlight can easily cause sunburn, and excessive UV exposure has been reported to increase the risk of long-term skin cancer, and sunlight is much less effective than blue light treatment.
For all these reasons, it is safer to give blue light to help reduce jaundice in children and sunlight is not recommended for routine use to reduce jaundice.