In the name of Allah, Most Gracious, Most Merciful.
Abu Sa’id al-Khudri (May Allah be pleased with him) narrated: The Prophet (May Allah exalt his mention and protect him from imperfection) said: “Any Muslim who makes a supplication containing nothing that is sinful and nothing that involves breaking ties of blood relationships, will be given for it by Allah one of these three things: He may accept his request, or assign its reward for him in the next world, or turn away from him an equivalent amount of evil.” (Al-Tirmidhi Hadith 2257)
There is no Muslim who makes a supplication, in which there is neither sin nor severing ties of kinship, save that Allah will grant because of it one of three things: either He will grant him a prompt response, or store it up for him in the Hereafter, or avert from him an equivalent harm. (Ahmad Musnad, 3:18; al-Hakim, Mustadrak, 1:463, where he declared the chain to be authentic (Sahih))
Commentary: We have to keep in mind, that the Muslim who makes the supplication should be meeting the requirements of the supplication, such as, doing the obligations, and not committing sins. Allah Alim.
And when My slaves ask you concerning Me, then (answer them), I am indeed near (to them by My Knowledge). I respond to the invocations of the supplicant when he calls on Me (without any mediator or intercessor). So let them obey Me and believe in Me, so that they may be led aright. (Koran 2.186)