If these five conditions are met, then it is obligatory for a person to fast.

Kaafirs are excluded from the first condition. The kaafir is not obliged to fast and his fast is not valid. If he becomes Muslim he is not obliged to make up fasts from before.

The evidence for that is the verse in which Allaah says (interpretation of the meaning):

“And nothing prevents their contributions from being accepted from them except that they disbelieved in Allaah and in His Messenger (Muhammad) and that they came not to As-Salaah (the prayer) except in a lazy state, and that they offer not contributions but unwillingly”

[al-Tawbah 9:54]

If the contribution is not acceptable even though it benefits others, because of their kufr, then other acts of worship may be even more unacceptable.

He does not have to make up fasts if he becomes Muslim because Allaah says (interpretation of the meaning):

“Say to those who have disbelieved, if they cease (from disbelief), their past will be forgiven”

[al-Anfaal 8:38]

And it was proven in mutawaatir reports that the Messenger (peace and blessings of Allaah be upon him) did not tell those who became Muslim to make up the obligatory duties that they had missed.

Will the kaafir be punished in the Hereafter for not fasting if he did not become Muslim?

The answer is:

Yes, he will be punished for not fasting, and for not doing any other obligatory duties, because if the Muslim who obeyed Allaah and adhered to His laws will be punished for that, then it is more apt that he (the kaafir) should be punished. If the kaafir is to be punished for the blessings of Allaah that he enjoyed, such as food, drink and clothing, then it is more appropriate that he will be punished for doing haraam actions and not doing obligatory duties. This is by way of analogy.

With regard to the texts, Allaah says that those on the Right (i.e., the believers) will say to the disbelievers:

“ ‘What has caused you to enter Hell?’

They will say: ‘We were not of those who used to offer the Salaah (prayers),

Nor used we to feed Al-Miskeen (the poor);

And we used to talk falsehood (all that which Allaah hated) with vain talkers.

And we used to belie the Day of Recompense’”

[al-Muddaththir 74:42]

These four things are what will cause them to enter Hell.

“We were not of those who used to offer the Salaah (prayers)” means they did not pray; “Nor used we to feed Al-Miskeen (the poor)” means they did not pay zakaah; “And we used to talk falsehood (all that which Allaah hated) with vain talkers” means things like mocking the verses of Allaah; “And we used to belie the Day of Recompense.”

The second condition:

He should be accountable (mukallaf). The one who is mukallaf is one who is has reached the age of puberty and is of sound mind, because a minor or one who is insane is not accountable. Puberty is reached when one of the three signs is noticed – see question no. 20475.

The one who is of sound mind is the opposite of one is insane, which is one who has lost his mind, whether he is insane or feeble-minded. Everyone who has lost his mind, in whatever sense, is not accountable and he is not obliged to do any of the obligatory duties of Islam, be it prayer, fasting or feeding the poor; he does not have to do anything at all.

The third condition:

Being able to fast. The one who is unable to fast does not have to fast, because Allaah says (interpretation of the meaning):

“and whoever is ill or on a journey, the same number [of days which one did not observe Sawm (fasts) must be made up] from other days”

[al-Baqarah 2:185]

But being unable to fast falls into two categories: temporary inability and permanent inability.

Temporary inability is that which is mentioned in the verse quoted above, such as one who is sick but hopes to recover, and the traveller. These people are allowed not to fast, then they have to make up what they missed.

Those who are permanently unable to fast, such as one who is sick and has no hope of recovery, or those who are elderly and are unable to fast, are mentioned in the verse (interpretation of the meaning):

“And as for those who can fast with difficulty, (e.g. an old man), they have (a choice either to fast or) to feed aMiskeen (poor person) (for every day)”

[al-Baqarah 2:184]

As Ibn ‘Abbaas (may Allaah be pleased with him) interpreted it, it refers to the old man and old woman who are not able to fast, so they should feed one poor person for each day.

The fourth condition:

He should be settled (not travelling). If he is travelling then it is not obligatory for him to fast, because Allaah says (interpretation of the meaning):

“and whoever is ill or on a journey, the same number [of days which one did not observe Sawm (fasts) must be made up] from other days”

[al-Baqarah 2:185]

The scholars are agreed that it is permissible for a traveller not to fast.

It is better for the traveller to do that which is easier. If fasting is likely to be harmful then it becomes haraam to fast, because Allaah says (interpretation of the meaning):

“And do not kill yourselves (nor kill one another). Surely, Allaah is Most Merciful to you”

[al-Nisa’ 4:29]

This indicates that whatever is harmful to a person is forbidden to him. See also question no. 20165.

If you ask, what is the degree of harm which makes fasting haraam?

The answer is:

Harm may be physical, or someone advises him that fasting may harm him. With regard to physical harm, that means that the sick person feels that fasting is harming him and causing him pain, and will delay his recovery and so on.

With regard to being advised, this means that a knowledgeable and trustworthy doctor tells him that it will harm him.

The fifth condition:

There should be no impediments. This applies specifically to women. Women who are menstruating or bleeding following childbirth should not fast, because the Prophet (peace and blessings of Allaah be upon him) said: “Is it not the case that when she gets her period, she does not pray or fast?”

So she should not fast and her fast is not valid in this case, according to scholarly consensus. And she has to make up the days missed, also according to scholarly consensus.