Along with Luke 11, this passage in Matthew 7 is usually used to teach persistence in prayer. If we consistently present our requests to God, he will answer them. This is foundational for the Prosperity Gospel and an anything-goes “name it and claim it” view of prayer. Many in the prosperity gospel movement believe it is God’s will for believers to be in good health, financially successful, and happy.
The problem is obvious, God does not always answer our prayer. We do not get the job, our sickness is not healed, etc. Sometimes pastors will say God always answers, but sometimes the answer is “no.” But that is not what this paragraph says. Jesus says “ask, and it will be given to you.” He then illustrates this and concludes that the Father will give good things to those who ask for them.

But is that what Jesus is teaching in Matthew 7:7-12? Does he say, “If you badger God long enough he will give you whatever you want”? Is the “name it and claim it” theology of the prosperity gospel right? We need to understand what Jewish prayer was in the first century. Did they make prayer requests as evangelical Christians do today?
Jesus tells his disciples to Ask, Seek and Knock. To “ask God” is to expect him answer. But Jesus is speaking to his own Jewish disciples, the ones he has already instructed to call God “father” (Matthew 6:9).
Some kid might come up to you and ask you for some basic need and you are free to help them (or not). If the child is your own, you have a clear obligation to take care of your child’s need. [I imagine a child might come up to me and ask me to help them blow their nose, in which case I would help them find their mother. But if my own child asked, I would (probably) help them]
The unsaved can pray to God, and God might answer their prayer, but God is not in a parent-child relationship with the unsaved person. The Book of Jonah is an example in of a pagan nation with no idea what God requires prayed for mercy and received it. That God provides good gifts to all people is a clear teaching of both the Old and New Testament. Obviously God does hear the prayers of the unregenerate who ask for the forgiveness of sin and accept Jesus as their savior.
Jesus is therefore talking about requests in prayer from God’s children. This is similar to Paul in Romans 8, the Spirit who helps us pray because we do not even know how to pray! Does a believer need to be in obedience to God’s will when they bring requests to God? Does the presence of sin in our life limit our prayers? Are your children always in perfect obedience when they ask you for things?
It is certainly possible for God to answer the prayers of a believer who is in sin. Like a human relationship, sin can cloud and disrupt a relationship. Even though God does not change, the believer may not be in a place to approach God in prayer. This is the reason the Lord’s Prayer included confession of sin (Matt 6:12). Virtually everyone who teaches on prayer includes confession as an important part of prayer. This is true for the Psalms, in the majority of the Psalms the author confesses his sin and the sin of his people before asking God to rescue him from his problems.
Does this mean a believer who is in sin shouldn’t ask anything from God until they have confessed all their sins? Not necessarily, since it is impossible to confess every sin.
Even in our requests to the good Heavenly Father, we ought to be submissive to God’s will. Why do your kids ask you for things? Sometimes they have real needs and they need help, but occasionally they have an ulterior motive (greed, get their sibling in trouble, etc.) James 4:3 says those who ask and don’t receive are asking from wrong motives. What might a “wrong motive” be for asking something from God? Selfishness? Greed? Jealousy?
Our prayers are motivated by our desires, but the effective prayers in the Old Testament are always motivated by what is best for God.
As we mature in Christ, we will bring each area of our lives under greater submissiveness to God’s will and our prayer requests will be more in line with God’s will. Just as a child matures and better understands their relationship with their parent, so too the believer matures and better understands God and our relationship with him. Prayer is part of that process.

American culture can fairly be described as a culture of condemnation and judging. Despite the pop-culture commitment to not judging others (“haters gonna hate,” “only God can judge me”), the culture we live in judges everything we wear, everything we say, and everything we do.
The ultimate example of non-judgmental outreach to sinners for the purpose of their reconciliation with God is Jesus, a “friend to the sinner.” Jesus eats with tax collectors and other sinners (Matthew 9:9-13, for example). This is more complex than “love the sinner, hate the sin.” When we model our lives after Jesus we will treat everyone with respect regardless of our view of their lifestyle.
In many ways, the death, burial and resurrection resulted in an inauguration of that Kingdom. In the Ascension Jesus is enthroned in heaven ruling, but there are other ways the kingdom is absent from the world. We do not live in a world in which all people acknowledge the lordship of Jesus (Phil 2:5-11). This is an in-between-time: God has inaugurated his kingdom with Jesus’s death, but will consummate it at some point in the future.
If the lilies of the field are well dressed, then God will see to our clothing (6:28-31). It is possible Jesus could gesture to flowers right where he was speaking. Lilies do not need to work to sew their clothes, yet they are “more beautiful than Solomon in all his splendor.” Even the grass is beautiful, even if it is temporary. God has created plants which will be pulled up and burned, how much more will he care for you?