Vajrapani is the second Dhyani-Boddhisattva emanated from dhyani-Buddha Akshyobhya. Renowned Chinese Philosopher Hsuan Tsang mentions Vajrapani as being with Tathagata Buddha Sakya-muni when subdued the gigantic snake in Udayana India. It is also related that when the Nagas [serpent gods] appeared before the Buddha to listen to his teachings, Vajrapani was charged by the Tathagata to guard them from the attacks of their mortal enemies, the garudas, and that, in order to deceive and combat the garudas, Vajrapani assumed a form with head, wangs, and claws like the garudas themselves.
The Nagas are believed to control the rain-clouds, hence Vajrapani, as their protector, is looked upon as the Rain god, and it is to him the Mahayana Buddhists appeal when rain is needed, or is too abundant.
Vajrapani is often painted in dark blue color, single, or along with Avalokitesvara and Manjushri Boddhisattva of infinite compassion and infinite wisdom/knowledge respectively. He is holding a Vajra [Tibetan: Dorje] in his right hand and a lasso in his left.
Vajrapani, the Bodhisattva with many benevolent characteristics, is the impeccable enemy of the demons. His virtuous characters are mentioned in a form of the legend. Once there was an assembly of the Buddhas all met together on the top of Mount Meru [Sumeru] to deliberate upon the best means of procuring the water of life, nectar [amrita] that lies concealed at the bottom of the ocean. The evil demons were in possession of the powerful poison, Hala-hala, and using it to bring destruction on humankind. In order to procure the antidote, they decided to churn the ocean with the Mount Meru
When Amrita, or nectar had risen to the surface of the water, they assigned a guard to a Vajrapani, until they should decide on the best means of using it. However, Vajrapani left elixir of life a moment unguarded and the monster, Rahu, stole it. That tempted all of those members of the divine and host's party. It was followed by a fearful struggle for the possession of the amrita. Rahu was conquered in the end, but the water of life had been defiled; and Buddhas, to punish Vajrapani, forced him to drink it whereupon he became dark blue from the poison mixed with amrita.