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.