This paper attempts to show how the object of prayer is linked to knowledge, as knowledge from a theological standpoint finds its root in God, and prayer from an Islamic perspective is seen as a direct communion with God. I will look at this from a cosmological aspect, with regard to the idea of man being created in the image of God and the Adamic potential of man. I will also look at the different levels of knowledge and what knowledge is for both Qadi Abu Bakr Ibn’ Arabi and Abu Hamid Al Ghazali. Ghazali emphasizes the concept of the heart being a vessel of knowledge and uses light as a metaphor for knowledge, I will try to outline how to attain a state where knowledge is possible by means of the heart, as well as showing from a cosmological perspective that the function of humans is to be in constant remembrance of God, thus constant prayer, through the idea of the divine names of God.