Belonging to faith in Christ awards us the privilege of an audience in prayer. Jesus emboldens us to come to God in all circumstances, with all our supplications and requests according to His will. Therefore we are to pray in confidence, knowing that God hears our prayers.
This is the confidence we have in approaching God: that if we ask anything according to his will, he hears us. -1 John 5:14
How are we to know His will? He has promised this in His word, which is a revelation of His will in the things which concern the salvation of man. We are justified in expecting what God has promised, and we should pray for what we expect.
And if we know that he hears us, whatsoever we ask, we know that we have the petitions that we desired of him. -1 John 5:15
Here’s the hard part. When we pray with confidence as we’ve been told, and our request is not granted, we may question whether the prayer was heard. Prayer is the language of the children of God, and if spoken through Jesus is heard by the Father. Now we are back to His will. Was the prayer made to boldly advance a claim which is not in accordance with His will, or was it agreeable to the revealed will of God? The former may result in pain, suffering, sadness, or hardship, yet God can use that hardship to accomplish His ultimate purposes. The prayer will be answered, in a way that’s in harmony with His perfect will. This is our perfect confidence in the Lord.
Rejoice always, pray without ceasing, give thanks in all circumstances; for this is the will of God in Christ Jesus for you. -1 Thessalonians 5:16-18