The Holy Qur'an does use allegory.. This is good for our understanding because we are not able to understand God entirely. If someone has said that we should read it literally, he probably means that we must not give it another meaning, saying it is not meant as it is written., so to say adapting the Qur'an to our thoughts. Instead we shall adapt our thoughts according to the Qur'an.
O you who believe! Revere God with due reverence, and do not die
except as Muslims. And hold fast to the rope of God, altogether, and
do not become divided. And remember God’s blessings upon you; how you
were enemies, and He reconciled your hearts, and by His grace you
became brethren. And you were on the brink of a pit of fire, and He
saved you from it. God thus clarifies His revelations for you, so that
you may be guided.
Tafseer ibn Khatir:
It was said that, بِحَبْلِ اللَّهِ (to the Rope of Allah) refers to Allah's covenant
The verse actually says to stay to believe in God, using an image.
You may take the image may refer as tug-of-war saying that we are on the rope on the side of God, or as in mountain-climbing, that God is our Guide and security. The last sentence fits better to the image of mountain-climbing (although I am not sure that this was already practised in the times of the Prophet ﷺ).
We have destined for Hell multitudes of jinn and humans. They have
hearts with which they do not understand. They have eyes with which
they do not see. They have ears with which they do not hear. These are
like cattle. In fact, they are further astray. These are the heedless.
Tafseer ibn Khatir:
(They have hearts wherewith they understand not, and they have eyes
wherewith they see not, and they have ears wherewith they hear not.)
meaning, they do not benefit from these senses that Allah made for
them as a means of gaining guidance. Similarly, Allah said,
وَجَعَلْنَا لَهُمْ سَمْعًا وَأَبْصَارًا وَأَفْئِدَةً فَمَا أَغْنَىٰ
عَنْهُمْ سَمْعُهُمْ وَلَا أَبْصَارُهُمْ وَلَا أَفْئِدَتُهُم مِّن
شَيْءٍ إِذْ كَانُوا يَجْحَدُونَ بِآيَاتِ اللَّهِ (And We had assigned
them the (faculties of) hearing, seeing, and hearts; but their
hearing, seeing, and their hearts availed them nothing since they used
to deny the Ayat.) [46:26].
It is comon in ancient writings (not only Arabic and not only Islamic) that the heart is said to be the seat of our understanding. The Quran speaks in the language of the people of the time. The heart is not an image in this sense.
(found several times but not in 1:7)
Their hearts were sealed = they were stubborn, not accepting (due to their disbelief). God has abandoned them as they have abandoned the path of God. Of course, "sealed" cannot be understood literally.
God is the Light of the heavens and the earth. The allegory of His
light is that of a pillar on which is a lamp. The lamp is within a
glass. The glass is like a brilliant planet, fueled by a blessed tree,
an olive tree, neither eastern nor western. Its oil would almost
illuminate, even if no fire has touched it. Light upon Light. God
guides to His light whomever He wills. God thus cites the parables for
the people. God is cognizant of everything. In houses which God has
permitted to be raised, and His name is celebrated therein. He is
glorified therein, morning and evening. By men who neither trading nor
commerce distracts them from God’s remembrance, and from performing
the prayers, and from giving alms. They fear a Day when hearts and
sights are overturned.
As for those who disbelieve, their works are like a mirage in a
desert. The thirsty assumes it is to be water. Until, when he has
reached it, he finds it to be nothing, but there he finds God, Who
settles his account in full. God is swift in reckoning. Or like utter
darkness in a vast ocean, covered by waves, above which are waves,
above which is fog. Darkness upon darkness. If he brings out his hand,
he will hardly see it. He to whom God has not granted a light has no
For tafseer, see here (too long to cite here).
Aya 39-40 has to be seen in the context with the preceding 35-37. In God is the light (beginning) without God is darkness (end). If you are a Christian (as you ask "how do Muslims interpret .." I think you are not a Muslim), you will see the parallel with Matthew 25, and Jesus liked to speak in allegories. All words about heaven is more or less allegoric.