In 1 John 3:21-22, John tells us that those who are confident before God have their prayers answered. Confidence comes to those who have examined themselves with the test of love John provides in 1 Jn 3:16-19. After examining themselves they have found that they are able to persuade their hearts that they are God’s children because they see evidences of biblical love present in their lives. As a result, they can and should go boldly before God in prayer, knowing they will receive what they ask of God because they keep His commandments and do what is pleasing before Him. John writes,
Beloved, if our heart does not condemn us, we have confidence before God; and whatever we ask we receive from him, because we keep his commandments and do what pleases him.
(1 John 3:21-22 ESV)
God is Not Our Cosmic Genie in the Sky
With these verses, John is not turning God into a Cosmic Genie and supporting a Health Wealth Gospel, which is evident because after telling us God answers our prayers, he provides the reason our prayers are answered at the end of verse 22.
What is the Basis for Answered Prayer?
The basis for answered prayer is two-fold and requires we:
(1) Keep God’s commandments
(2) Do what is pleasing to Him
When a person keeps God’s commandments and does what is pleasing to Him, they show they are a true believer. True believers will pray according to God’s will because His will has become their will.
In addition to seeking God’s will, when John tells us that answered prayer comes to those who do things that are pleasing to God, it includes things we ask for in our prayers. This means believers would not ask God to make them into a millionaire, give them a new car because it makes them look cool, or ask God to cause a jury to acquit them, when they are guilty of their crime. These things are not done in obedience to God’s commandments, nor are they done to please God; rather, they are done to please oneself.
So, those who desire to obey God’s commandments and do those things which please Him, will have their prayers answered because their prayers will be inline with God’s commandments and with what pleases Him.
When God Does Not Answer Prayer
In talking about answered prayer, the question usually arises: What about those times when we are confident before God, coming boldly to the throne room of prayer, obeying His commandments and seeking to do those things that please Him, as well as we are praying according to God’s will, but our prayer is seemingly not answered right away, why does this occur?
In other words, what are we to think when God does not seemingly answer our prayers?
Charles Spurgeon, one of the greatest preachers of all time, when faced with this question gives this counsel:
If you have been knocking at the gate of mercy and have received no answer, shall I tell you why the mighty Maker has not opened the door and let you in? Our Father has reasons peculiar to himself for keeping us waiting. Sometimes it is to show His power and His sovereignty, that men may know that Jehovah has a right to give or to withhold. More frequently the delay is for our profit.
You are perhaps kept waiting in order that your desires may be more fervent. God knows that delay will quicken and increase desire, and that if He keeps you waiting, you will see your necessity more clearly, and will seek more earnestly; and that you will prize the mercy all the more for its long tarrying. There may also be something wrong in you that has need to be removed, before the joy of the Lord is given. Perhaps your views of the gospel plan are confused, or you may be placing some little reliance on yourself, instead of trusting simply and entirely in the Lord Jesus. Or, God makes you tarry awhile that He may the more fully display the riches of His grace to you at last.
Your prayers are all filed in Heaven, and if not immediately answered; they are certainly not forgotten, but in a little while shall be fulfilled to your delight and satisfaction. Let not despair make you silent, but continue instant in earnest supplication .
In another place He also says,
Still remember that prayer is always to be offered in submission to God’s will; that when we say that God hears prayer, we do not intend that He always gives us literally what we ask for. We do mean, however, that He gives us what is best for us. If He does not give us the mercy we ask for in silver, He bestows it upon us in gold. If he does not take away the thorn in the flesh, He says, “My grace is sufficient for thee, and that comes to the same in the end .
So, if it seems that God does not answer our prayer, there are a number of reasons for that, but we always are to pray that God’s will be done and rest in that.
In these verses, John seeks to assure believers who are confident before God, obey His commandments, and do what is pleasing to Him, that God will answer their prayers, even if it does not seem like He does. As a result, we are to come boldly before God in prayer, lifting our requests up to Him. After which, we are to remain confident He has heard us, and we are to know that He will answer in due time and in the way He sees fit, if He has not answered already.
So then, may we all examine ourselves to see if we are true believers. If we are true believers, may we all go boldly to God this week in our time of prayer, knowing the Lord hears us and will answer us in due time.
 Spurgeon on Prayer: How to converse with God, compiled and edited by Harold J. Chadwick, 59-60.
 Spurgeon on Prayer: How to converse with God, compiled and edited by Harold J. Chadwick, 304.