God is omniscient. He is aware of every prayer that is prayed and every thought every person has. Nothing escapes His notice (Psalm 139:1–4), He rules over everything (Isaiah 46:9–11) and holds everything together (Colossians 1:17). So the question is not whether God can hear us, but whether He listens to our prayers with an intent to answer.
Does God hear my prayers?
First, we must mention that God will always listen to a prayer of repentance. Those who come to God in humility, recognizing their own sinfulness and the futility of trying to earn God's favor, and confess their faith in Jesus Christ as the only Savior and Lord, will never be turned away. God is eager to forgive and justify (John 3:16–18). "If you confess with your mouth that Jesus is Lord and believe in your heart that God raised him from the dead, you will be saved" (Romans 10:9).
It is on the basis of salvation in Jesus that any subsequent prayer is heard. Hebrews 4:14–16 and 10:19–23 speak to this. In John 14:13 Jesus told His disciples, "Whatever you ask in my name, this I will do, that the Father may be glorified in the Son." First John 5:14–15 clarifies this: "And this is the confidence that we have toward him, that if we ask anything according to his will he hears us. And if we know that he hears us in whatever we ask, we know that we have the requests that we have asked of him."
God hears us when we are a child of His through Jesus Christ (John 1:12) and when we make our requests upon that basis, and in accordance with His will. The Bible gives us plenty of information about God's will. For example, we see God's heart for people to repent and come to Him (Luke 18:13–14; Acts 2:38; 2 Peter 3:9). We see God's willingness to forgive (1 John 1:9). We see God's desire for us to be transformed and to become holy (Romans 12:1–2; 1 Peter 1:15–16). We see His desire for us to forgive one another, live peaceably with one another, bear one another's burdens, and love one another with godly love (Ephesians 4:32; Romans 12:18; Galatians 6:2; John 13:34–35; 1 John 4:7–8). More examples could be added, but the idea is that the things that the Bible tells us are clearly in God's will are prayers that He will listen to.
The Bible also tells us some reasons God might not listen to our prayers. James 4:2–3 says, "… You do not have, because you do not ask. You ask and do not receive, because you ask wrongly, to spend it on your passions." Clearly, if we neglect to pray, there is nothing for God to listen to. He knows our hearts and He knows our needs, and He also still desires that we come to Him in prayer (Philippians 4:6–7; 1 Thessalonians 5:17; Ephesians 6:18). Prayer is part of relating with God; it is not a means by which to obtain the things we want as if God was some sort of divine Santa Claus. When our prayers are intended toward selfish ends, God often denies our requests. It is not that He doesn't hear, but, as a wise parent would to a toddler with a case of the "gimmes," He doesn't listen.
That being said, this does not mean that any time God does not grant our prayer or any time He seems not to be listening it is because of our own sinfulness. Many times God answers our prayers in unexpected ways. For example, you might pray for a specific job, but the job goes to someone else because God has something different in mind for you. Or perhaps you pray for release from a particular hardship, but it is God's will that you go through that hardship because from it He brings about healing for past hurts.
If we feel like God is not listening to our prayers, it is wise to examine our own hearts. When we find sinfulness, we should repent and confess; God is faithful to forgive (1 John 1:9). But also continue praying. The Psalms are a good demonstration of just how honest and vulnerable we can be with God in prayer. We can admit to Him that we are afraid He isn't listening to us and ask Him to show us the reason or to give us peace in the silence. In Luke 18 Jesus "told them a parable to the effect that they ought always to pray and not lose heart" (Luke 18:1). Persisting in prayer, especially with a malleable heart that is truly seeking God's will and is willing to listen to Him, is appropriate.
Remember that our faith is in God, not in the way we pray or in the specific outcome of our prayer. We can pray for specific things and outcomes, but we ultimately pray for His will to be done. We can imitate Jesus in the garden of Gethsemane (Matthew 26:36–46). The Father heard Jesus' prayer, but He did not allow the cup to pass. Jesus was still crucified—on our behalf and willingly because of His great love for us. Jesus prayed for God's will to be done, and it was. Salvation was made available to all of humanity (John 3:16–18). Because of that, we, too can approach God in prayer. We can trust that He hears us. We can also trust that He will respond as He knows is best. So we submit to Him, approach Him boldly and eagerly with confidence, and also trust Him with the outcome. What we most want is for His will to be done, and for ourselves to be transformed to be more like Him (Romans 8:28–29).
Is there evidence for answered prayer? Does God answer prayer?
How should Christians deal with unanswered prayer?
Why pray? What is the purpose of prayer?
What types of prayer are mentioned in the Bible?
What is the importance of daily prayer in the life of a Christian?
Truth about Prayer