Belief (iman) certainly requires prayer. Human nature strongly yearns for prayer. And, also, God Almighty declares in the Quran,
Say [unto those who believe]: “No weight or value would my Sustainer attach to you were it not for your prayer!” (Quran, 25:77)
God also commands us,
Call unto Me, [and] I shall respond to you! (Quran, 40:60)
Now, you may ask: “We frequently offer prayers, but they are not accepted. While the verse is general, it states that every prayer is answered?”
The answer is that responding and accepting are two different things. Each prayer is responded to, but it being accepted and you getting exactly what you asked for depends on God’s wisdom. As an illustration of this, think of a child calling onto her doctor: “Doctor! Doctor!” The doctor responds by saying, “Sure, here am I. What would you like?” The child, who was prescribed a sweet and colorful pill previously, asks to get it again: “Please give me that medicine!” The doctor will either give her exactly what she asks for or something better and more beneficial for her. Or knowing that it is harmful for her illness, he may give her nothing. Therefore, even when he decides to prescribe no medicine, he is responding to her.
Similarly, since Almighty God is the Absolute Sovereign, [Hākim al-Muṭlaq], All-Present and All-Seeing, He responds to the prayers of His worshipers. Through His presence and response, He transforms their desolation of loneliness and solitude into familiarity. Keep in mind that as He responds to all prayers, He does so not in accordance with our capricious demands and wishful thinking, but in accordance with His Divine wisdom. He gives either what is asked for, or what is better than it, or He gives nothing at all.
Besides, prayer is worship. Consequences of worship are directed to eternity. While our earthly needs and wishes mark the times for such prayer and worship, they cannot be the real thrust and aim of our worship.
For instance, prayer and ṣalāt (ritual prayer) for rain is an act of worship. Just as the setting of the sun marks the time for sunset ritual prayer (ṣalāt al-maghrib), the lack of rain marks the time for rain ritual prayer (salāt al-istisqā). The ritual prayer for rain is not for bringing the rain per se. Rather it is an act of worshipping God at a time of drought, admitting our neediness, and articulating our dependence on God. If your intention in the ritual prayer of rain is solely focused on getting rain, then your ritual prayer is not sincere and authentic worship. (It is insincere and inauthentic in that with such attitude, you are not intending to connect with God, but simply to get what you want.) Therefore, it is not worthy of acceptance.
Similarly, the eclipses of sun and the moon mark the time for two special prayers, known as “ritual prayers at eclipse” [salāt al-kusuf and salāt al-khusuf]. During these eclipses, the night and the day, which are two bright signs of God, become temporarily veiled. This veiling reveals the grandeur and majesty of God in a new way, and the ritual prayers offered at this time are a way of recognizing Divine grandeur and majesty. The eclipse ritual prayers are not so that the eclipse is lifted– after all, the duration of eclipse is already set and can be computed by astronomers in advance.
Likewise, drought is the time for rain prayer. Similarly, when you encounter challenges and are afflicted with various trials, it means it is time for certain prayers. During these trying times, the person realizes his weakness and seeks refuge in the Absolute Powerful One. If the troubles do not go away despite a lot of prayers, do not say: “my prayers were not accepted.” Rather, understand that the time for the prayer is not over yet. If God takes care of the troubles with His kindness and generosity, then that is even better, and in that case the time of such prayer is over.
In sum, prayer is a heart of worship. And, worship must be purely for the sake of God. Admitting and articulating our weakness and vulnerability, we should seek refuge in God with prayer. We should not meddle in with His nurturing care (rubūbiya). We should trust His Providence and wisdom, and not accuse His compassion (raḥma).
(This section has been translated and adapted from Said Nursi’s Words, 23rd Word, by Yamina Mermer & Isra Yazicioglu)