Intercourse with one's wife in Ramadaan may mean one of two things, either at night or during the day.
Intercourse at night is permissible. Night lasts from when the sun first sets until dawn comes.
The ruling at the beginning of Islam was that intercourse was permissible during the nights of Ramadaan so long as one had not yet gone to sleep. If a person went to sleep it became haraam for him to have intercourse after that, even if he woke up before dawn came. Then Allaah made the ruling easier and allowed intercourse at any time during the night in Ramadaan. This is indicated by the words of Allaah (interpretation of the meaning):
“It is made lawful for you to have sexual relations with your wives on the night of As‑Sawm (the fasts). They are Libaas [i.e. body-cover, or screen, or Sakan (i.e. you enjoy the pleasure of living with them)] for you and you are the same for them. Allaah knows that you used to deceive yourselves, so He turned to you (accepted your repentance) and forgave you. So now have sexual relations with them and seek that which Allaah has ordained for you (offspring), and eat and drink until the white thread (light) of dawn appears to you distinct from the black thread (darkness of night), then complete your Sawm (fast) till the nightfall.”
al-Sa’di (p. 87) said:
When the fast was first enjoined, it was haraam for the Muslims to eat, drink or have intercourse at night after having slept, but that caused hardship for some of them, so Allaah made it easier for them and allowed them to eat, drink and have intercourse at any time during the nights of the fast, whether they had slept or not, because they were deceiving themselves.
“so He turned to you” means that He made something easier for you that would have caused to fall into sin otherwise; “and forgave you” for what is past. “So now” means, after this concession and ease that has been granted by Allaah, “have sexual relations with them” means intercourse, kissing, touching, etc.
“and seek that which Allaah has ordained for you” means intend, when you have relations with your wives, to obey Allaah thereby and to achieve the greater purpose of intercourse, which is to have children, keep oneself and one’s wife chaste, and to achieve the purposes of marriage.
Al-Jassaas said in Ahkaam al-Qur’aan (1/265):
Intercourse, eating and drinking are permitted during the nights of the fast from the beginning (of the night) until dawn comes.
Al-Bukhaari (4508) narrated from al-Bara’ (may Allaah be pleased with him) that when the obligation of fasting was first revealed, they would not come near to their wives for the whole of Ramadaan, and some men deceived themselves, then Allaah revealed “Allaah knows that you used to deceive yourselves, so He turned to you (accepted your repentance) and forgave you”.
With regard to the phrase, “when the obligation of fasting was first revealed, they would not come near to their wives for the whole of Ramadaan” – it appears from the context of this report that intercourse was forbidden both night and day, unlike eating and drinking which were allowed at night so long as one had not slept. But the rest of the ahaadeeth narrated on this topic indicate that no such distinction was made, so the words “they would not come near to their wives” may be understood as referring to what most of the people did, so as to reconcile between the reports.
“you used to deceive yourselves” means that they had intercourse with their wives and ate and drank at the time when it was forbidden to them. This was mentioned by al-Tabari. And it was narrated from Mujaahid that “you used to deceive yourselves” means that they wronged themselves. From ‘Awn al-Ma’bood.
With regard to intercourse during the day in Ramadaan on the part of one who is obliged to fast, the scholars are agreed that it is haraam and is one of the things that invalidate the fast.
It says in al-Mughni (4/372):
We do not know of any differing opinion among the scholars with regard to the fact that whoever has intercourse in the vagina, whether he ejaculates or not, or ejaculates outside the vagina, has broken his fast if he did that deliberately. This is indicated by the saheeh reports.
Indeed intercourse is the most serious of the things that break the fast, and expiation must be offered for that.
Al-Bukhaari (2600) and Muslim (111) narrated that Abu Hurayrah (may Allaah be pleased with him) said: a man came to the Prophet (peace and blessings of Allaah be upon him) and said, “O Messenger of Allaah, I am doomed!” He said: “Why is that?” He said, “I had intercourse with my wife when I was fasting.” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Do you have a slave whom you can set free?” He said, “No.” He said: “Can you fast for two consecutive months?” He said, “No.” He said, “Can you afford to feed sixty poor persons?” He said, “No.” Then a man from among the Ansaar brought a basket of dates. He said: ‘Take this and give it in charity.” The man said: “To someone poorer than us? O Messenger of Allaah, by the One Who sent you with the truth, there is no family between the two lava fields (i.e., in Madeenah) poorer than us.” The Prophet (peace and blessings of Allaah be upon him) said: “Go an feed it to your family.”
For more information on the consequences of intercourse during the day on Ramadaan, see question no. 49614.