Agnosticism can play a role in the theology of different religions, though it's not something people usually hear about. Most theologians start from the assumption that a god exists and so take the existence of a god for granted. This is treated as knowledge, at least on a practical level. A few theologians, though, question this assumption and argue that we can't know if a god exists or, at the very least, that we can't know the precise qualities and nature of this god.
First it must be understood that agnosticism and theism are compatible rather than mutually exclusive. Some think that agnosticism is a "third way" between theism and atheism, but that's false. Agnosticism is not knowing if any gods exist or not; theism is believing in the existence of at least one god. Agnostic theism is thus believing in the existence of a god but not claiming to know for sure that this god definitely exists.
Because theism deals with belief and agnosticism deals with knowledge, they are actually independent concepts. You can have a wide range of beliefs about gods without being able to to claim to know for sure whether those gods definitely exist. Agnostic theism is thus a sort of faith: believing without the sort of evidence that would entail knowing.
Agnostic theism can also be defined a bit more narrowly as belief in the existence of a god but not knowing the true nature or essence of this god. This definition of agnostic theism is a bit more common among theologians, some of whom accept it as reasonable and some of whom criticize it as insufficient.
Agnostic Theology & Apophatic Theology
Agnostic theism isn't a term that is frequently used by theists themselves, but the concept is not unheard of — especially among mystics. Gregory of Nyssa, for example, insisted that God was so transcendent that God must necessarily be forever unknown and unknowable. He did, however, argue that it was through admitting and exploring the "not-knowing" God that a true believer could eventually acquire knowledge of god.
Other theologians outside the mystical tradition have also recognized the importance of this issue. William of Ockham, for example, argued that the articles of Christian faith were improbable at best when considered by natural reason and probably false. They were, at the very least, incomprehensible.
We cannot prove the articles of faith with we reason when we cannot even entirely understand them. This includes the existence and will of God and this is what philosopher Anthony Kenny has called a combination of “devout fideism and philosophical agnosticism.”
Maimonides was a Jewish theologian who argued that agnosticism was reasonable because there are limits to human knowledge. Maimonides has become particularly well known for his exposition of the apophatic way of understanding God. The term apophatic comes from the Greek term for "denial," and this sort of theology involves approaching God by denying everything that God is not. Thus, Maimonides wrote: "God has no positive attributes ...the negative attributes of God are the true attributes."
George H. Smith, writes in Atheism: the Case Against God:
The agnostic theist believes in the existence of god, but maintains that the nature of god is unknowable. The medieval Jewish philosopher, Maimonides, is an example of this position. He believed in god, but refused to ascribe positive attributes to this god on the basis that these attributes would introduce plurality into the divine nature—a procedure that would, Maimonides believed, lead to polytheism.
According to the religious agnostic, we can state that god is, but — due to the unknowable nature of the supernatural—we cannot state what god is.
The form of agnosticism adopted by Maimonides is not the minimal agnosticism of "not knowing for sure if God exists or not" but a deeper, philosophical agnosticism that argues that human knowledge is far too limited to reach certainty on questions involving God — not just the existence of God, but what God might be like at all.
Agnosticism & Aquinas
Aquinas was a Christian theologian who accepted that one might reasonably conclude that they couldn't know exactly what God was — but only if a person relied exclusively on reason. True knowledge of God should still be attainable if one properly combines reason with revelation.
J.J. Haldane writes in Atheism and Theism:
As Aquinas (thus far the greatest philosopher-theologian) was wont to observe, the knowledge of God provided by reason alone amounts to a form of agnostic theism: a warranted conviction that there is a God, and an equally warranted uncertainty as to his nature.
Eleonore Stump writes in Aquinas
If God is absolutely simple, as Aquinas maintains, then many terms cannot be predicated univocally of God and creatures. On the other hand, only a radically agnostic theism would maintain that terms ordinarily predicated of creatures can be predicated of God just in some equivocal sense.
The agnosticism allowed by Aquinas is far more limited than the agnosticism advocated by theologians like Maimonides. Aquinas probably would have agreed with Maimonides that there are limits to human knowledge, but would have disagreed that this excludes knowing the nature of God. The reasons for this can be traced to other elements in their differing theologies, even though they both operated from similar traditions.