Many roguelikes include virtual gods as part of their gameplay. (Some do not: see the "Games without gods" section, below.) The gods are supernatural entities of divine power, often residing in another plane in the game, which the player has the option of worshiping (or at least worshiping a selection of them). They are usually extremely powerful and quite eccentric to totally insane. The world of mortals would be totally no concern for them if only they didn't have so much ambition and desire to have as many and as dedicated followers as possible. Although it is said that the gods gather them to fuel their insatiable ego needs, it is said that some have been known to just toy around with poor mortals. Others hold that the very power of the gods depends on mortal faith and that their interest is practical. Thus the gods intervene into the lives of 'weak beings' to make them aware of the presence of divine force and gain their attention.
It is worthwhile to carefully consider which (if any) god you would like to serve.
Dedicating your lifetime
Some characters start out as follower of a certain god. Often they are bound to some god by race and/or alignment choices. Others begin without a special bond to any one god and have yet to discover a way to sacrifice his lifetime as servant. This might be done by praying at altar, making a suitable donation or worthy sacrifice. Exact way is determined by game. In POWDER, one chooses a god to follow each time one gains a level and this determines one's "class" for that level.
Staying a follower
Gods usually expect certain behavior from followers. Some may ask to fight the unholy and demonic plagues while others will be pleased by eradicating magic users and yet another bunch will want you to slay all that is pure and good. Your god may like to receive or demand regular sacrifices. You should check what kind of sacrifices are pleasing, because an error will almost surely summon wrath upon you. Various quests and tasks are to be performed in god's name.
The bright side is that as a follower you may be granted special powers which rely on your god's might. You may also be allowed to pray for help to receive divine intervention. Sometimes a gift may be granted as a sign of appreciation for devotion.
At times you may wish to leave your god for another or abandon religious life. In Nethack, your god is assigned by class and alignment, changed only by changing alignment. In Crawl, you may choose to change gods, but if you abandon a god (other than changing from one of the "good" gods to another), the spurned god will take vengeance upon you for some time to come. In some Angband variants, it is possible to abandon your god by turning on and slaying it, if you worship one of the beings you must kill to complete the game.
The nature of the gods
Some gods are rather predictable, others are such forces of chaos that their "gifts" to their devotees may be misfortunes almost as often as they are blessings. Gods vary in how proactive they are, as well. In some games, one must pray in order to get the attention of a god in order to prompt action by the god. (In Crawl, prayer is used to dedicate actions to a god, although this is less true than it used to be, with more gods automatically accepting certain actions without prayer.) In others, gods will act on their own accord, with varying degrees of sensitivity to the current situation of their followers. In the typical roguelike, a god only attends to his own follower's behavior, but in POWDER all gods are active, reacting to the player's actions and offering benefits or punishments accordingly.
Games without gods
Some roguelikes do not include gods.
One example: Hack version 1.0.3, released by Andries Brouwer, did not include any gods. The game did include a stub "pray" command, but as the source code indicates, that the command did nothing but output the words "You finished your prayer". Prayer did not become useful until the game's direct descendant, the NetHack, was released.