In Vedic religion, Varuna (Sanskrit Varuṇa वरुण) a, is a god of the sky, of water and of the celestial ocean, as well as a god of law and of the underworld. A crocodile named Makara is his mount. Varuna continued to be considered the god of all forms of the water element, particularly the oceans.
In Srimad Bhagvad Geeta, Lord Krishna says;
अनन्तश्चास्मि नागानां वरुणो यादसामहम् ।
पितृणामर्यमा चास्मि यमः संयमतामहम् ॥
I am Ananta (Sheshanaga) among the nagas, of the creatures of water I am Varun, of the departed ancestors I am Aryama and of those who administer and uphold laws, I am Yama.
As chief of the Adityas, Varuna has aspects of a solar deity though, when opposed to Mitra (Vedic term for Surya), he is rather associated with the night, and Mitra with the daylight. As the most prominent Asura, however, he is mostly concerned with moral and societal affairs than being a deification of nature. Together with Mitra, he is the supreme keeper of order and god of the law.
Varuna and Mitra are the gods of the societal affairs including the oath, and are often twinned Mitra-Varuna (a dvandva compound). Varuna is also twinned with Indra in the Rigveda, as Indra-Varuna
As a sky god, Varuna may either correspond to, or rule over, the dark half of the sky—or celestial ocean (Rasā)—or represent the ‘dark’ side of the Sun as it travels back from West to East during the night.
The Rigveda and Atharvaveda portrays Varuna as omniscient, catching liars in his snares. The stars are his thousand-eyed spies, watching every movement of men.
In the Rigveda, Indra, chief of the Devas, is about six times more prominent than Varuna, who is mentioned 341 times. This may misrepresent the actual importance of Varuna in early Vedic society due to the focus of the Rigveda on fire and Soma ritual, Soma being closely associated with Indra; Varuna with his omniscience and omnipotence in the affairs of men has many aspects of a supreme deity. The daily Sandhyavandanam ritual of a dvija addresses Varuna in this aspect in its evening routine, asking him to forgive all sins, while Indra receives no mention.
Both Mitra and Varuna are classified as Asuras in the Rigveda, although they are also addressed as Devas as well, possibly indicating the beginning of the negative connotations carried by Asura in later times.
In post-Vedic texts Varuna became the god of oceans and rivers and keeper of the souls of the drowned. As such, Varuna is also a god of the dead, and can grant immortality. Varun which means wind. He is attended by the nagas. He is also one of the Guardians of the directions, representing the west.