“Thou should’st not think of God: think of the devil.” What part does religion play in Doctor Faustus?
It can be said that religion plays a central part in Marlowe's Doctor Faustus. Goethe's version makes the significance of religion a little more pointed through the character of Gretchen and the scene "Night" that takes place among a Chorus of Angels. The reason for this role is that the original legend, drawn from chapbooks, the first one dating 1587, stem from the experience of a real Doctor of Divinity who renounced the Church and embraced necromancy, or magic, and is said to have sold his soul to the Devil. In a scenario like this original one, religion must play an important part in later versions such as Marlowe's.
In Marlowe's retelling of the Faust legend, Faustus is also a Doctor of Divinity and renounces God and religion:
MEPHISTO. ... pray devoutly to the prince of hell.
FAUSTUS. So Faustus hath
Already done; and holds this principle,
There is no chief but only Belzebub;
A Good Angel and a Bad Angel vie for dominance of his conscience. As Faustus is about to sign his soul away to the Lucifer in blood, he hesitates and has doubts and wonders if he perceives portents of warning:
FAUSTUS. Why streams it not, that I may write afresh?
FAUSTUS GIVES TO THEE HIS SOUL: ah, there it stay'd!
Why shouldst thou not? is not thy soul thine own?
Then write again, FAUSTUS GIVES TO THEE HIS SOUL.
In the end, the Old Man and the Scholars try to guide Faustus to repentance and seeking God's forgiveness. With elements like these all throughout, it must be acknowledged that religion has an important part.
The quote you refer to comes fairly early on. Faustus has asked Mephistophilis to tell him who made heaven and earth. Mephisto refuses, telling him to think not on such questions but on hell. Faustus's response, by way of a rebuttal to Mephisto's directive, isn't quite good enough a response:
MEPHISTO. ... Think
thou on hell, Faustus, for thou art damned.
FAUSTUS. Think, Faustus, upon God that made the world.
With an ominous, "Remember this," Mesphisto walks out. Then, after a visit from the Good and Bad Angels, Lucifer appears. He chastises and tells Faustus his duty as a contractee of Hell;
LUCIFER. Thou talk'st of Christ, contrary to thy promise:
Thou shouldst not think of God: think of the devil,
And of his dam too.
The battle Faustus wages--and looses--for full, unfettered knowledge revolves around religion (e.g., who made the cosmos: God) and centers on the fate of Faustus, which may end with the Good or end with the Evil. This all has to do with religion and the battle between good and evil, heaven and hell, that is inherent to religion.
Mephistophiles plays the part of the bad angel, a tutelary figure who is conversant with evil and the devil's dishonest practices, so that the roles are reversed: "thinks not of God;" On the other hand, the good-hearted old man plays the part of the good angel whose attempts at saving Faustus's soul from damnation are meant to thwart the devil's evil designs. Consequently, the genre of the morality plays allows Marlowe to dramatize the struggle of good and evil forces for the possession of man's soul.
On the other hand, there is grating irony in the depiction of religion, of the Catholic Church and of the Pope. The Church is corrupt and contemptible as it threatens and tortures wiser men than him. In the play (not in reality), Giordano Bruno, the 16th century philosopher is saved from the Inquisition and the stake by Faustus who is nonetheless damned and whose dead body is found atrociously dismembered by his disciples at the end of the play.