The Prophet, peace and blessings be upon him, stated:
“Whoever wishes that Allah responds to his du’a at times of hardship, then let him increase his du’a at times of ease!” (Recorded in al-Tirmidhi)
And Ibn Abbas narrated that he was once riding behind the Prophet, peace be upon him, on a mount when he, peace be upon him, said:
“O youth! Do you not wish that I should teach you some advice that Allah will benefit you with?”
I responded, “Yes!” He then said:
“Protect (the commandments) of Allah, and Allah will protect you, protect (the commandments) of Allah, and you will find Him ever in front of you. Know Him when you are in a state of contentment, and He will know you when you are in a state of need.” (Recorded in Ahmad)
The meaning of this hadith is that if a person worships Allah and remembers Him at times of ease, then Allah will remember and help them at times of hardship.
Constant remembrance of Allah is a sign that a person loves Allah. Imagine a son who only comes to his parents when he needs their help, and does not remember them when he is not in need of them. Is it not more likely that they will help him if he continually remembers them, and shows his care towards them?
This is why one of the signs of a disbeliever is that they only remembers Allah when they are in a state of need. We should therefore strive to make du’a at all times, whether we are in our youth or old age, in sickness or health or in a state of poverty or wealth. For verily, we are in need of Allah at all times.