Once we understand that talking with God is like talking to a person who is with us always, and that Scripture (especially the Psalms) can be a helpful guide in learning what to pray and how to pray, all of mystery disappears from praying according the will of God.
Several passages in Scripture have caused lots of problems over the years regarding prayer. Here are some of the more prominent:
Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you. For everyone who asks receives, and he who seeks finds, and to him who knocks it will be opened. Or what man is there among you who, if his son asks for bread, will give him a stone? Or if he asks for a fish, will he give him a serpent? If you then, being evil, know how to give good gifts to your children, how much more will your Father who is in heaven give good things to those who ask Him! (Matthew 7:7-11)
If you abide in Me, and My words abide in you, you will ask what you desire, and it shall be done for you. (John 15:7)
Now this is the confidence that we have in Him, that if we ask anything according to His will, He hears us. And if we know that He hears us, whatever we ask, we know that we have the petitions that we have asked of Him. (1 John 5:14-15)
Some have developed entire ministries around this idea that if you want something, all you have to do is ask God for it, and ask with enough faith, He will give it to you whatever you ask.
What is often neglected in these ministries is that the emphasis in the context of these Scriptures is not on the kind of faith or the amount of faith, but on abiding with Christ and asking according to the will of God.
Abide with Christ
What does it mean to abide with Christ? It means to remain, to dwell, to stay with. Abiding with Christ, or remaining with Him, is a prominent theme in John 14-17, and the first letter of John, and in both contexts it seems that to abide with Christ simply means to always be aware of His presence. To be in constant communication with Him. To understand that He is always with you, and you are always with Him.
To abide with Christ means to talk with Him and go through life with Him as you would someone who is always by your side.
As we develop this constant awareness and the constant communication that Goes with it, and as we learn to pray the Scriptures, we will soon find that our prayer life changes, what we pray for changes, and how we pray changes.
We will soon be praying for things that are only found in Scripture, which of course are all according to the will of God, and those things which we pray for which are not found in Scripture, our prayers for them will simply be part of a long-running conversation with God where He challenges some of our motives and requests and helps us focus on what we really need from His perspective, and what would be best for His purposes and mission in the world.
Praying According to the Will of God
As we pray Scripture, and as we pray conversationally with God, we can know that He is informing and guiding and refining our prayer requests so that we are praying according to His will.
We pray according to the will of God as we gain awareness of the presence of God.
This is important because according to the passages above, when we pray according to His will, we know that He hears us, and we know that we have what we asked of Him. When we pray according to His will, we are guaranteed that our prayers get answered.