Whatever we ask, we receive from Him, because we keep His commandments
1 John 3:21-22 New American Standard Bible
21 Beloved, if our heart does not condemn us, we have confidence before God; 22 and whatever we ask, we receive from Him, because we keep His commandments and do the things that are pleasing in His sight.
Jesus spoke of abiding in Him. When we remain in Christ each day and draw near to Him, our hearts and minds become one with Him. His desires become our desires. Our prayers align with the desires of His heart.
The reason we can have confidence in drawing near to God is because our sin was dealt with through Jesus suffering and His death. The wrath of God was poured out upon Him. The punishment that we rightfully deserve for our sin and wickedness, was poured out upon Him. When we are covered by the blood of Jesus it is no longer our sin that our Father sees in Heaven, but it is the righteousness of Jesus.
John says if our hearts do not condemn us. In the previous verse John wrote in whatever our heart condemns us; for God is greater than our hearts. The enemy will hurl false accusation against us. The scheme and purpose of Satan is to drive a wedge between us and Almighty God. The safest place we will find ourselves is walking closely to Christ and drawing near to Him. The most dangerous place will be to believe the lie of the enemy that God is angry at us and to run in the other direction.
If we are truly abiding in Christ and walking in obedience, we know that our hearts and minds are aligned with Almighty God. Because of this our prayers will be aligned with His purpose and will. If this is indeed the case then we can have confidence to know that whatever we ask of the Lord will be done for us. Because the very things we are praying for will align with His purpose and will.
God will never do anything that is outside His will or purpose. God is sovereign and fully in control. If we do pray something that is outside His will for our lives the answer will be no. Not because He is stingy or mean, but because His plans are perfect and if God has closed the door to something or sad no, it is simply for our best. We must remember all that He does in our lives is because of His love for us.