In India, Cannabis, locally known as bhang and ganja, is associated with worship of the Hindu deva Shiva, Bhang is offered to Shiva images, especially on MahaShivratri (night of the Great Shiva) festival.
Wise drinking of bhang, according to religious rites, is believed to cleanse sins, unite one with Shiva and avoid the miseries of hell in the after-life. In contrast, foolish drinking of bhang without rites is considered a sin.
Source: Courtwright, David (2001). Forces of Habit: Drugs and the Making of the Modern World. Harvard Univ. Press. p. 39
The Atharva Veda mentions Cannabis to be one of the five sacred plants and the guardian angel resides in its leaves. In certain Vedic rituals, Cannabis stems were thrown into the ritual fire (yagna) to overcome enemies and evil forces. The Vedas also refer to it as a source of happiness, joy giver and liberator. According to Hindu legend, when and devas and demons churned the oceon, nectar (amrit) as well as poison (vish) emerged. When a drop of the amrit fell on the ground, the Cannabis plant sprouted from it. This plant is believed to bestow supernatural powers to its user.
In Tibet, this plant has been traditionally considered sacred. According to one Mahayana Buddhist tradition, the Buddha, in his last six years of ascetism before enlightenment, subsisted on one Cannabis seed daily.
In Tantric Buddhism this plant is taken to highten awareness during certain rituals.
Source: Touw, Mia. “The religious and medicinal uses of Cannabis in China, India and Tibet”. J Psychoactive Drugs 13 (1). https://www.cnsproductions.com/pdf/Touw.pdf.