Praise be to Allah, and peace and blessings be upon the Messenger of Allah. To proceed:
Supplication does not contradict belief in divine decree. Rather, it is part of Allah’s decree and one of the means that Allah has made a cause for bringing about good and warding off harm. Therefore, we supplicate to Allah for great reasons:
First: Because Allah loves His servants to ask Him and humble themselves before Him.
Supplication is an act of worship that demonstrates the servant’s need for his Lord and His سبحانه self-sufficiency. Allah تعالى says:
﴿And ask Allah of His bounty﴾ [An-Nisa: 32],
and He says:
﴿Call upon your Lord with humility and privately﴾ [Al-A'raf: 55],
and He says:
﴿O mankind, you are those in need of Allah, while Allah is the Self-Sufficient, the Praiseworthy﴾ [Fatir: 15].
Second: Because Allah has decreed things together with their causes, not merely the outcomes.
Just as being full is decreed through eating, being quenched is decreed through drinking, and provision is decreed through striving and working, Allah may likewise decree for a servant that he obtains what he seeks through supplication.
Therefore, saying, “If something is decreed, it will happen without supplication,” is incorrect, because supplication itself may be part of the decree through which Allah has decreed that the desired thing will occur.
For this reason, Shaykh al-Islam Ibn Taymiyyah, may Allah have mercy on him, stated that supplication, reliance upon Allah, and righteous deeds are means for obtaining good, and that Allah سبحانه created causes and their effects and made some of them causes for others.
Third: Because supplication is never wasted.
The Prophet صلى الله عليه وسلم said:
“There is no Muslim who makes a supplication that contains neither sin nor severing family ties, except that Allah gives him one of three things because of it: either He hastens his supplication for him, or He stores it up for him in the Hereafter, or He turns away from him an equivalent amount of evil.”
It was narrated by Ahmad, and the scholars regarded it as good and authentic.
A person may supplicate for something but not receive that specific thing. This does not mean that his supplication was in vain. Allah may have warded off some harm from him because of it, stored its reward for him, or granted him what he sought at the time required by His wisdom.
Likewise, supplication itself is an act of worship for which the servant is rewarded. Therefore, it is not correct to abandon supplication on the grounds that everything has already been written, because this is similar to abandoning the use of means on the grounds that the outcomes have already been decreed.
The scholars of Ahl as-Sunnah have explained that divine decree does not mean abandoning the means. Just as a person eats and drinks seeking nourishment and satisfaction of thirst, he supplicates to Allah seeking goodness and relief, while believing that Allah alone determines the causes and their outcomes.
In conclusion: We supplicate to Allah while believing in divine decree because supplication is an act of worship that Allah loves, because it is one of the means that Allah has decreed for obtaining what is sought and warding off what is disliked, and because supplication never leaves a person empty-handed: either the servant’s supplication is answered, some harm is turned away from him, or its reward is stored up for him in the Hereafter.
Therefore, a Muslim should supplicate and take the appropriate means while placing complete reliance upon Allah, and should not abandon supplication on the grounds that everything is already decreed.
And Allah knows best.