It is better for pregnant and breastfeeding women not to fast if it is too hard for them to fast
Question

Is it better for a pregnant woman not to fast or is it better for her to fast and put up with the hardship?.
Praise be to Allah.Firstly: 
Whoever studies the rulings on fasting will find that Allah has prescribed it as something to be done in an easy manner, and that taking an easy attitude towards it is something that is beloved to Allah. Hence Allah says in the verses on fasting (interpretation of the meaning): 
“Allah intends for you ease, and He does not want to make things difficult for you” [al-Baqarah 2:185]
If the hardship of fasting reaches such a level that there is the fear of harm, then it is haraam to fast in that case. Hence the Prophet (peace and blessings of Allah be upon him) said concerning a traveller who fasted even though it was so difficult: “It is not righteousness to fast when travelling.” Narrated by al-Bukhaari, 1946; Muslim, 1115. 
And he said when some of the Sahaabah fasted on a journey although it was very difficult: “Those are the disobedient ones, those are the disobedient ones.” Narrated by Muslim, 1114. 
Al-Nawawi said:  
This is understood to refer to those who were harmed by fasting. End quote. 
It was narrated that ‘Aa’ishah (may Allah be pleased with her) said: “The Messenger of Allah (peace and blessings of Allah be upon him) was never given the choice between two things but he would choose the easier of the two unless it was a sin; if it was a sin, he would keep the farthest away from it of all people.” Narrated by al-Bukhaari, 3560; Muslim, 2327. 
Al-Nawawi (may Allah have mercy on him) said: 
This indicates that it is mustahabb to choose the easier option so long as it is not haraam or makrooh. End quote. 
Ahmad (5832) narrated that Ibn ‘Umar (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Allah loves to see His concessions accepted as He hates to be disobeyed.” Classed as saheeh by al-Albaani in Irwa’ al-Ghaleel, 564. 
This evidence indicates that the easier an act of worship is on a person, the closer it is to the aims of sharee’ah.  
Secondly: 
The scholars stated that it is better for a sick person for whom fasting is difficult not to fast. Al-Qurtubi (2/276) said: It is mustahabb for him not to fast and no one fasts (in such a case) but one who is ignorant. End quote. 
Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (4/404): Fasting is makrooh for a sick person for whom fasting is difficult.  
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in al-Sharh al-Mumti’ (6/356): 
Thus we can see the mistake of some of those who try hard despite being sick, for whom fasting is difficult or may harm them, but they refuse to break their fast. We say: They are erring by not accepting the kindness of Allah and the concession He has granted, and by harming themselves. Allah says (interpretation of the meaning): 
“And do not kill yourselves” [al-Nisa’ 4:29]
end quote. 
See also question no. 1319. 
Thus it is clear that if fasting is too difficult for pregnant and breastfeeding women, it is better for them not to fast. In fact the scholars have clearly stated that it is haraam for them to fast if fasting will harm the foetus or child. 
Al-Jassaas said in Ahkaam al-Qur’aan (1/252): 
Either pregnant and breastfeeding women will themselves be harmed by fasting or their children will be harmed. In either case, not fasting is better for them and fasting is not allowed in their case. If fasting will not harm them or their children, then they have to fast and it is not permissible for them to break the fast. 
He also said (1/307): 
Those who are sick, and women who are pregnant or breastfeeding, and every one who fears that he or his child may be harmed by fasting, should not fast, because it is possible that the harm and hardship of fasting is a kind of difficulty. Allah has stated in the Qur’aan that He does not want to cause any difficulties to us. This is akin to the report that when the Prophet (peace and blessings of Allah be upon him) was given the choice between two things, he would always choose the easier of the two. 
Ibn Muflih said in al-Furoo’ (3/35): 
It is makrooh for pregnant and breastfeeding women to fast if there is the fear that they or their children may be harmed. 
Ibn ‘Aqeel said that if a pregnant or breastfeeding woman fears for the pregnancy or the nursing infant, it is not permissible to fast, and she must offer the fidyah. If there is no such fear then it is not permissible for her not to fast. 
Shaykh Ibn Baaz (may Allah have mercy on him) said: 
The ruling on pregnant and breastfeeding women is the same as that on those who are sick; if it is difficult for them to fast, then it is prescribed for them not to fast. 
Tuhfat al-Ikhwaan bi Ajwabah Muhimmah bi Arkaan al-Islam, p. 171 
And Allah knows best.