We came across a number of birds sunning themselves. A rail was standing with its back to the sun with its feathers rustled up to expose the skin below, noisy miners were in a full sunbathing posture with wings and tail feathers spread out to maximize the area open to the sun. The bronzewing pigeons were lying on one side with one wing raised to the sun. The reasons for sunning, and benefits to the bird are a matter of supposition. Obviously, in many cases the birds get warmth from the sun which reduces the amount of metabolic energy they have to expend in order to maintain a constant body temperature of around 40 degrees C.
However, it's summer here. Some birds do sunbathe in temperatures which are quite hot, and they end up over-heated as they can be seen panting. Therefore, some scientists have theorised that the sun's warmth is important in helping dislodge feather parasites. Others suggest that the ultra-violet in sunlight helps turn some precursor molecule in the preening oil into vitamin D and that the birds need this vitamin. It is known that these precursor molecules exist in preening oil and that ultra-violet light will stimulate the conversion into vitamin D. What is not known is how well this happens on the bird's body and how important the amount of vitamin D created would be to the bird.