Answer
Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Thank you for your question and your interest to know the teachings of your religion, Islam.
Among the ethics of du`aa’ is that a person does good deeds so that Allah will respond to his du`aa’. Also, du`aa’ when breaking one’s fasting will be answered by the grace of Allah.
Answering your question, Dr. Wael Shehab, PhD in Islamic Studies from Al-Azhar University and currently the Imam of the Downtown Toronto Masjid in Canada, states:
As far as du`aa is concerned, a Muslim needs to follow the ethics and conditions of du`aa’ as elaborated by the Sunnah.
So, a Muslim needs to obey Allah, draw himself or herself nearer to Him by doing good deeds, and choose good times in which du`aa’ will be answered by Allah Almighty.
Fasting is one of the good deeds through which a Muslim draws himself or herself closer to Allah. Also, du`aa’ on the time of breaking one’s Fasting will be answered by Allah’s grace and favor. Prophet Muhammad (peace and blessings of Allah be upon him) said, “A fasting person, upon breaking his fast, has a supplication that will not be rejected.”
So, it is Ok for a person to fast in order to bring himself or herself nearer to Allah and to have a good time for du`aa’.
Allah Almighty knows best.