Having a wet dream during the day in Ramadaan does not invalidate the fast, because this is a matter that is beyond a persons control, and he cannot prevent it. Allaah says (interpretation of the meaning):
Allaah burdens not a person beyond his scope[al-Baqarah 2:286]
If a man experiences a wet dream this does not invalidate his fast, because it was involuntary on his part; it is similar to the case when something enters his throat whilst he is sleeping.
See al-Mughni by Ibn Qudaamah, vol. 3, p. 22
The Standing Committee was asked about a man who had a wet dream during the day in Ramadaan what is the ruling on that? They replied:
Whoever has a wet dream whilst he is fasting or is in a state of ihraam for Hajj or Umrah, there is no sin on him and he does not have to offer expiation (kafaarah). It does not affect his fast, but he does have to do ghusl to cleanse himself from janaabah (impurity) if maniy (semen) was emitted.
Fataawa al-Lajnah al-Daaimah, vol. 10, p. 274
Ihtilaam (wet dream) means seeing intercourse in ones dream.
This is one of the things that Allaah has created in human nature for men and women alike. Hence it was narrated from Umm Salamah the Mother of the Believers that she said: Umm Sulaym the wife of Abu Talhah came to the Messenger of Allaah (peace and blessings of Allaah be upon him) and said, O Messenger of Allaah, verily Allaah is not shy of (telling you) the truth. Is it necessary for a woman to take a bath (ghusl) after she has a wet dream? The Messenger of Allaah (peace and blessings of Allaah be upon him) said, Yes, if she notices a discharge. (Narrated by al-Bukhaari, al-Ghusl, 373; Muslim, al-Hayd, 471).
What is meant by a wet dream is when a person who is sleeping imagines intercourse.
And al-Bukhaari narrated from Abu Salamah that Abu Qutaadah al-Ansaari said: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: Dreams come from Allaah and bad dreams come from the Shaytaan. So if any one of you sees a dream that he dislikes, let him spit drily to his left side and seek refuge with Allaah from it, and it will not harm him. (al-Tabeer, 6488; Muslim, al-Ruyaa, 4196). This does not mean that the Shaytaan is the one who causes that.
The fact that the maarids (strong jinns) are chained up during Ramadaan does not mean that the devils stop whispering into peoples hearts and urging them to do evil; but that happens to a lesser extent in Ramadaan than in other months. The effects of this are well known and can be seen.
Ibn Hajar said: the fact that bad dreams are mentioned in conjunction with the Shaytaan means that they share his characteristics of lying and exaggeration, etc., unlike true dreams which are mentioned in conjunction with the name of Allaah by way of honour, even though all of them are created and decreed by Allaah.Fath al-Baari, 12/393.