Devas and the supernatural in Buddhism
While Buddhist traditions do not deny the existence of supernatural beings (e.g., the devas, of which many are discussed in Buddhist scripture), it does not ascribe powers, in the typical Western sense, for creation, salvation or judgement, to the "gods". They are regarded as having the power to affect worldly events in much the same way as humans and animals have the power to do so. Just as humans can affect the world more than animals, devas can affect the world more than humans. While gods may be more powerful than humans, none of them are absolute (unsurpassed). Most importantly, gods, like humans, are also suffering in samsara, the ongoing cycle of death and subsequent rebirth. Gods have not attained nirvana, and are still subject to emotions, including jealousy, anger, delusion, sorrow, etc. Thus, since a Buddha shows the way to nirvana, a Buddha is called "the teacher of the gods and humans" (Skrt: śāsta deva-manuṣyāṇaṃ). According to the Pali Canon the gods have powers to affect only so far as their realm of influence or control allows them. In this sense therefore, they are no closer to nirvana than humans and no wiser in the ultimate sense. A dialogue between the king Pasenadi Kosala, his general Vidudabha and the historical Buddha reveals a lot about the relatively weaker position of gods in Buddhism.
Though not believing in a creator God, Buddhists inherited the Indian cosmology of the time which includes various types of 'god' realms such as the Heaven of the Thirty-Three, the Four Great Kings, and so on. Deva-realms are part of the various possible types of existence in the Buddhist cosmology. Rebirth as a deva is attributed to virtuous actions performed in previous lives. Beings that had meditated are thought to be reborn in more and more subtle realms with increasingly vast life spans, in accord with their meditative ability. In particular, the highest deva realms are pointed out as false paths in meditation that the meditator should be aware of. Like any existence within the cycle of rebirth (samsara), a life as a deva is only temporary. At the time of death, a large part of the former deva's good karma has been expended, leaving mostly negative karma and a likely rebirth in one of the three lower realms. Therefore, Buddhists make a special effort not to be reborn in deva realms.
It is also noteworthy that devas in Buddhism have no role to play in liberation. Sir Charles Eliot describes God in early Buddhism as follows:
The attitude of early Buddhism to the spirit world — the hosts of deities and demons who people this and other spheres. Their existence is assumed, but the truths of religion are not dependent on them, and attempts to use their influence by sacrifices and oracles are deprecated as vulgar practices similar to juggling.
The systems of philosophy then in vogue were mostly not theistic, and, strange as the words may sound, religion had little to do with the gods. If this be thought to rest on a mistranslation, it is certainly true that the dhamma had very little to do with devas.
Often as the Devas figure in early Buddhist stories, the significance of their appearance nearly always lies in their relations with the Buddha or his disciples. Of mere mythology, such as the dealings of Brahma and Indra with other gods, there is little. In fact the gods, though freely invoked as accessories, are not taken seriously, and there are some extremely curious passages in which Gotama seems to laugh at them, much as the sceptics of the 18th century laughed at Jehovah. Thus in the (Pali Canon) Kevaddha Sutta he relates how a monk who was puzzled by a metaphysical problem applied to various gods and finally accosted Brahma himself in the presence of all his retinue. After hearing the question, which was "Where do the elements cease and leave no trace behind?" Brahma replies, "I am the Great Brahma, the Supreme, the Mighty, the All-seeing, the Ruler, the Lord of all, the Controller, the Creator, the Chief of all, appointing to each his place, the Ancient of days, the Father of all that are and are to be." "But," said the monk, "I did not ask you, friend, whether you were indeed all you now say, but I ask you where the four elements cease and leave no trace." Then the Great Brahma took him by the arm and led him aside and said, "These gods think I know and understand everything. Therefore I gave no answer in their presence. But I do not know the answer to your question and you had better go and ask the Buddha."
The Pali Canon also attributes supernatural powers to enlightened beings (Buddhas), that even gods may not have. In a dialogue between king Ajatasattu and the Buddha, enlightened beings are ascribed supranormal powers (like human flight, walking on water etc.), clairaudience, mind reading, recollection of past lives of oneself and others. Yet, according to the Buddha, an enlightened person realizes the futility of these powers and instead unbinds himself completely from samsara through discernment.