The essence of prayer is not the effort to make God give us something-- just as this is not the basis of sound human friendship--but there is a legitimate prayer of petition.  God has two kinds of gifts: First, there are those that He sends us whether we pray for them or not; the second kind are those that are given on condition that we pray.

The first gifts resemble those things a child receives in a family, food, clothing, shelter, care, and watchfulness. These gifts come to almost every child, whether the child asks for them or not. But there are other gifts, which are conditioned upon the desire of the child. A father may be eager to have a son go to college, but if the boy refuses to study or becomes a delinquent, the gift that the father intended for him can never be bestowed. It is not because the father has retracted his gift but, rather, because the son has made the gift impossible.

Of the first kind of gifts, Our Blessed Lord spoke when He said, "[He] sends the rain on the righteous and on the unrighteous" (Matthew 5:45). He spoke of the second kind of gifts when He said, "Ask and the gift will come" (see Matthew 21:22). Prayer then, is not just informing God of our needs, for He already knows them. "Your heavenly Father knows that you need all these things" (Matthew 6:32). Rather, the purpose of prayer is to give to God the opportunity to bestow the gifts He will give us when we are ready to accept them.

An Essential Condition for Prayer

God does not show Himself equally to all creatures. This does not mean that He has favorites, that He decides to help some and to abandon others. But the difference occurs because it is impossible for Him to manifest Himself to certain hearts under the conditions they set up. The sunlight plays no favorites, but its reflection is very different on a lake and on a swamp. A person's prayer often keeps step with his moral life. The closer our behavior corresponds with the Divine Will, the easier it is to pray; the more our conduct is out of joint with divinity, the harder it is to pray. Just as it is hard to look in the face of someone we have grievously wronged, so is it hard to lift our mind and heart to God if we are in rebellion against Him.

This is not because God is unwilling to hear sinners, He does hear them. He has a special predilection (love,choice) for them for as He said, "I have come to call not the righteous but sinners" (Mark 2:17). "There will be more joy in heaven over one sinner who repents than over ninety-nine righteous persons who need no repentance" (Luke 15:17) But these sinners were the ones who corresponded with His will and abandoned their rebellion against it. Where the sinner has no desire to be lifted from his evil habits, the essential condition for prayer is not present.

Prayer Is Not Magic

Everyone knows enough about God to pray to Him, even those who say that they doubt His existence. If they were lost in the woods, they would have no assurance whatever of anyone nearby who might help them find their way, but they would shout, nevertheless, in the hope that someone would hear . In like manner, the skeptic finds that, though he thought himself incapable of prayer, he nonetheless prays in catastrophe and in crisis. But those who use prayer only as a last resort do not know God very well, they hold Him at arm's length most of the time, refusing Him the intimacy of every day. The little knowledge of God that such people possess does not become fruitful or functional, because they never act upon that knowledge: the Lord ordered that the unproductive talent be taken away (see Matthew 25:14-30).

Unless a musician acts upon the knowledge that he already has of music, he will not grow either in knowledge or in love of it. In this sense our conduct, behavior, and moral life become the determinants of our relationship with God. When our behavior is godless, licentious, selfish, egotistic, and cruel, then prayer is an extraneous thing, a mere attempt at magic, an attempt to make God serve our wishes in contradiction to the moral laws He has laid down.

Prayers of petition are for oneself, prayers of intercession are for others. If we truly love as God wants us to love, we will not only pray for ourselves but also for others. As the Divine Mercy prayer says, "Have mercy on us and all the whole world."

Source: Archbishop Fulton Sheen.