"We can approach God with confidence for this: if we make requests which accord with his will he listens to us; and if we know our requests are heard, we know that the things we ask for are ours" (1 John 5:14-15)
This seems utterly reasonable. If somebody asks me something that I have and which agrees with my plan for the person, I give it. So it is important to ensure that our prayers agree with God's will for us. How do we know God's will for us? How do I find out God's will for me in the Enterprise?
The believer who is in fellowship with God will not ask anything that is contrary to God's will. The Holy Spirit will see to it that our desires and prayers accord with God's will for us.
"Whatever you ask in my name, I will do it" (John 14: 13-14; Cf Matthew 7:7, 18:9).
To pray in Jesus' name, to pray as he prayed, is to offer perfect prayer. It is prayer that accords in His will. Such prayer is always answered, though the answer may be delayed and different from our expectations. The assurance that God hears and answers our prayer is for the Christian the final confidence in victory - that he is guarded by God and no power of evil can ultimately triumph over him. (THE INTERPRETERS ONE VOLUME COMMENTARY OF THE BIBLE.)
John sees prayer as having a wider scope for he speaks of asking for anything, but he immediately qualifies this "with accordance to his will." Prayer is not a device for inducing God to change his mind and do whatever we want. It must be offered in accord to God's will if it is to be effective. When it is offered in this way, God hears us. Elsewhere we learn that prayer must be in faith (Mk 11:24), in the name of Jesus (Jn 14:14), offered by those who abide in Christ (Jn 15:7), who have forgiven those who offend them (Mk 11:25); it must be accompanied by obedience (1 Jn 3:22), and it must not be for the gratification of one's passions (James 4:3). All this is involved in praying according to the will of God. From the thought that God hears us, we move to the consequences, namely that he grants our requests. (NEW BIBLE COMMENTARY R220.7N532)
John presents prayer as a privilege belonging to faith in Christ. The Lord Christ emboldens us to come to God in all circumstances. Through Jesus, our petitions are accepted by God. The matter of our prayer must be agreeable to the declared will of God. We may have confidence that the prayer of faith shall be heard in heaven.
The advantage accruing to us by such privilege, v15. To know that his petitions are heard or accepted is as good as to know that they are answered. (MATTHEW HENRY'S COMMENTARY IN ONE VOLUME - R220.7 H523)
When believers are so responsive to the guidance of the Spirit of truth that their prayers accord with God's will, God hears their prayers and grants their requests. (HARPERS BIBLE COMMENTARY - R220.7H215)
"Whatever you ask in my name, I will do it, so that the Father may be glorified in the Son. If you ask me anything in my name, I will do it" (Jn 14: 13-14)
Whatever: the scope of the prayer. Eg: To do God's will, faith, patience, wisdom, humility and courage.
Ask: The condition of prayer - Ask and keep asking.
In my name: The ground of prayer. This involves at least two things: praying in the authority Christ gives (cf Mt 28:19; Acts 3:6) and praying in union with Him, so that one does not pray outside His will.
That I will do: The certainty of prayer.
That the Father may be glorified in the Son: the purpose of prayer. (WYCLIFFE BIBLE COMMENTARY)