Short answer
Islam teaches that dreams are of three kinds. A good dream is glad news from God (﷾). A distressing dream comes from Satan. Some dreams are only the mind talking to itself. A Muslim who has a bad dream seeks refuge in God (﷾) and tells no one, and it will not harm him. The Prophet (ﷺ) said that whoever sees him in a dream has truly seen him, because Satan cannot take his form. Ibn Sirin, an early scholar, added that this holds only if he is seen as he really looked, and his looks were recorded in detail. But a dream is never proof of a religion. Islam rests on the revelation given to the Prophet (ﷺ), not on the dreams of his followers.
Full explanation
Three kinds of dream
The Prophet (ﷺ) divided dreams into three: a good dream from God (﷾), a distressing dream from Satan, and the mind talking to itself. He taught what to do with each. Thank God (﷾) for a good dream and share it. For a bad one, seek refuge in God (﷾) and tell no one, and it will do no harm.
Abu Hurayra reports that the Prophet (ﷺ) said dreams are of three kinds: a good dream, which is glad news from Allah; a distressing dream, which comes from Satan; and a dream that is only what a person's own mind tells him. Whoever sees a dream he dislikes should get up and pray, and should not tell it to people.
Abu Sa'id al-Khudri reports that the Prophet (ﷺ) said: a dream you like is from Allah, so thank Allah for it and tell it. A dream you dislike is from Satan, so seek refuge with Allah from its harm and tell no one, and it will not harm you.
True dreams in the Qur'an
The Qur'an tells of true dreams. Joseph dreamed as a boy of the stars bowing to him. Later he interpreted the king's dream of the fat and lean cattle. A vision shown to the Prophet (ﷺ), of entering the Sacred Mosque in safety, came true. Prophethood has ended, but the Prophet (ﷺ) said one part of it remains: good dreams that bring glad news. They comfort; they bring no new law.
“Behold! Joseph said to his father: "O my father! I did see eleven stars and the sun and the moon: I saw them prostrate themselves to me!"”
“The king (of Egypt) said: "I do see (in a vision) seven fat kine, whom seven lean ones devour, and seven green ears of corn, and seven (others) withered. O ye chiefs! Expound to me my vision if it be that ye can interpret visions."”
“Truly did Allah fulfil the vision for His Messenger: ye shall enter the Sacred Mosque, if Allah wills, with minds secure, heads shaved, hair cut short, and without fear. For He knew what ye knew not, and He granted, besides this, a speedy victory.”
Abu Hurayra reports that the Prophet (ﷺ) said nothing is left of prophethood except al-mubashshirat. Asked what they are, he said: true good dreams, which bring glad news.
Seeing the Prophet (ﷺ) in a dream
The Prophet (ﷺ) said that whoever sees him in a dream has truly seen him, because Satan cannot take his form. Muhammad ibn Sirin was a scholar of the generation after the Companions. He added a condition: it holds only if the Prophet (ﷺ) is seen in his real form. That form can be checked, because those who knew him described him closely: his height, his colouring, his hair.
Anas reports that the Prophet (ﷺ) said: whoever sees me in a dream has truly seen me, because Satan cannot take my form.
Abu Hurayra reports that the Prophet (ﷺ) said Satan cannot take his form in a dream. Al-Bukhari adds that Muhammad ibn Sirin, one of the Successors, said this holds only when the Prophet is seen in his real form.
Anas ibn Malik describes the Prophet (ﷺ): of middle height, neither tall nor short; of a rosy colour, neither very white nor dark brown; his hair neither tightly curled nor straight; and at his death scarcely twenty white hairs in his head and beard.
Why a dream proves no religion
A Hindu sees Krishna, a Catholic sees Mary, a Muslim sees the Prophet (ﷺ). Each is certain. And each vision confirms what the dreamer already believed. But an experience found in every faith cannot by itself decide between faiths. That is why Islam never rests on the dreams of ordinary believers. A prophet's dream is revelation, as Abraham's was. But prophethood has ended, and a Muslim who sees the Prophet (ﷺ) gains comfort, not proof. The Law of Moses says the same. Even a dreamer whose sign comes true is not to be followed if his message is wrong. The test is the message, not the experience.
“Then, when (the son) reached (the age of) (serious) work with him, he said: "O my son! I see in vision that I offer thee in sacrifice: Now see what is thy view!" (The son) said: "O my father! Do as thou art commanded: thou will find me, if Allah so wills one practising Patience and Constancy!"”
“Muhammad is not the father of any of your men, but (he is) the Messenger of Allah, and the Seal of the Prophets: and Allah has full knowledge of all things.”
“If there arise among you a prophet, or a dreamer of dreams, and giveth thee a sign or a wonder, And the sign or the wonder come to pass, whereof he spake unto thee, saying, Let us go after other gods, which thou hast not known, and let us serve them; Thou shalt not hearken unto the words of that prophet, or that dreamer of dreams: for the Lord your God proveth you, to know whether ye love the Lord your God with all your heart and with all your soul.”
What the Bible says about visions of light
Many Christians report seeing Jesus in a dream, robed in light. Paul, a Christian missionary of the first century, warned that Satan himself takes the form of an angel of light. In Matthew's Gospel, Jesus warns of false Christs with great signs. He says his real return would not be in secret rooms but plain to all, like lightning across the sky. Both warnings mean the same thing: a figure in light cannot vouch for itself. Also, the New Testament Gospels never say what Jesus looked like. The robed figure people describe matches the Jesus of church art, a type that took shape in Roman and Byzantine images from the fourth century. It is not the Middle Eastern man who walked in Galilee. This is the same test Ibn Sirin set for dreams of the Prophet (ﷺ): is he seen as he really looked?
“And no marvel; for Satan himself is transformed into an angel of light.”
“For there shall arise false Christs, and false prophets, and shall shew great signs and wonders; insomuch that, if it were possible, they shall deceive the very elect.”
“Wherefore if they shall say unto you, Behold, he is in the desert; go not forth: behold, he is in the secret chambers; believe it not. For as the lightning cometh out of the east, and shineth even unto the west; so shall also the coming of the Son of man be.”
Abu Hurayra reports that the Prophet (ﷺ) said Satan cannot take his form in a dream. Al-Bukhari adds that Muhammad ibn Sirin, one of the Successors, said this holds only when the Prophet is seen in his real form.
Suppose the vision was real
If Jesus did appear to someone, it would prove that he is alive. Muslims already believe that: the Qur'an says God (﷾) raised him up to Himself, and that he was not killed or crucified. Nothing in such a dream shows that he is God or that he died for anyone. Where he comforts and reassures, that is exactly what a living prophet would do. It is exactly what Muslims believe Jesus to be. And if a figure in a dream did say "I am God", the test above applies. The message is checked against revelation, and that one fails it.
“That they said (in boast), "We killed Christ Jesus the son of Mary, the Messenger of Allah";- but they killed him not, nor crucified him, but so it was made to appear to them, and those who differ therein are full of doubts, with no (certain) knowledge, but only conjecture to follow, for of a surety they killed him not:-”
“Nay, Allah raised him up unto Himself; and Allah is Exalted in Power, Wise;-”
Verse by verse
Acts 2:17 — Acts of the Apostles, chapter 2, verse 17
“And it shall come to pass in the last days, saith God, I will pour out of my Spirit upon all flesh: and your sons and your daughters shall prophesy, and your young men shall see visions, and your old men shall dream dreams:”
Cited for
God promised to pour out His Spirit so that believers would see visions and dream dreams. A dream of Jesus is that promise at work.
The response
The same Bible says a dreamer is judged by his message. It says that even a sign that comes true proves nothing if the message is wrong. Paul, a Christian missionary of the first century, warns that Satan comes as an angel of light. Jesus warns of false Christs with great signs. So the Bible itself says a vision cannot vouch for itself.
Where it lands — By the Bible's own test, a dream of a figure in light proves nothing until its message is checked.
Perspectives
Christian
God still speaks through dreams and visions, as Peter announced at Pentecost. Many Christians who have seen Jesus in a dream take it as his personal call to them.
At Pentecost, a Jewish feast, Peter (a disciple of Jesus) quoted the prophet Joel. Peter said that in the last days young men would see visions and old men would dream dreams.
Rebuttal
Islam agrees only that true dreams remain: nothing is left of prophethood except good dreams that bring glad news. Peter's verse does not say a dream proves its own source. Moses' test is the message, so a figure who claims to be God fails it, however bright he looks.
The Islamic perspective
Dreams are good, bad or idle, and the Prophet (ﷺ) taught how to treat each. Seeing him in his real form is a true sight of him. But no ordinary person's dream is a source of religion: that is revelation alone.
The Prophet (ﷺ) taught that dreams are of three kinds: from God (﷾), from Satan, and from one's own mind.
He told Muslims to thank God (﷾) for a good dream. For a bad one, they should seek refuge and not tell it.
He said that whoever sees him in a dream has truly seen him, because Satan cannot take his form.
Ibn Sirin held that this applies only when the Prophet (ﷺ) is seen in his real form. His Companions described that form.
Of prophethood only good dreams remain, and they bring glad news, not new teaching.
A vision of Jesus, if real, would show that he is alive, which the Qur'an already teaches.