What is the mythological significance of ritually giving water to sun after bathing?
Giving water to Sun (Surya) after bathing is known as
Arghya and this ritual is known as
Sandhyâ Upâsânâ. Devi Bhagavatam, Eleventh Book, Chapter XVI gives the reason for Sandhyopasana as:
Thirty Koti Râksasas known as the Mandehas, always roam on the path of the Sun (the mental Sun also). They are great heroes, treacherous and ferocious. They always try to devour the Sun, while they assume terrible forms. For this reason the Devas and the Risis combined offer the water with their folded hands to the Sun, while they perform the great Sandhyâ Upâsanâ. The water thus offered, becomes transformed into the thunderbolt and burns the heads of the cruel demons (and throws them on the island Mandehâruna)
Another answer based on another Shastra.(Harita Smriti,Chapter 6,named Garhastya,The Domestic Mode of Life)
The significance of offering water to Sun is as follows:
Having rinsed, the mouth, as laid down in the Mantram, one should again rinse it. Then sprinkling one's own self with water, as described in the Mantram, one should throw palmfuls of water. (12)
By virtue of the boon conferred by Brahma, whose birth is not known, the Rakshasas Mandeha fight every morning with the Sun. (13)
The handfuls of water, thrown by the Brahmanas and inspired with the mystic verse Gdyatri, destroy all the Rakshasas passing under the appellation of Mandeha. (14)
NOTE-This answer differs from the accepted answer only regarding the Scripture that is used as reference.Otherwise both answers say the same thing.