Just a beginning study...
Abimilech sinned without knowing it. He was still responsible for the outcome of his sin. So was Abraham. Abimilech was to return Sarah, and Abraham was to pray for him. The prayer wasn't responsible for the healing; God was. But the prayer showed God that Abraham had forgiven. I think it also showed Abimilech that Abraham had forgiven him, and that contributed to his healing.
People may abuse this concept. "Ok, ok, I'll do what you want. Now pray for me." It doesn't work that way. Still, God sometimes honors these prayers in order to show His faithfulness. Sometimes it isn't the heart of the seeker but the heart of the one who prays that He honors.
In bitterness of soul Hannah wept much and prayed to the LORD (1 Samuel 1:10)
This passage goes on to say that Hannah made a promise. She recognized that she was asking for a gift and that gift would come with a responsibility. What will I do with the gift I am asking for?
In 1 Samuel 12, the people again abuse the concept of prayer, assuming that Samuel's prayer would absolve them of their sins. But Samuel also recognizes that failing to pray for them would also be a sin because it would mean that he willingly stood between them and God. Along with his prayer, he said that he would teach them what was right.
They buried the bones of Saul and his son Jonathan in the tomb of Saul's father Kish, at Zela in Benjamin, and did everything the king commanded. After that, God answered prayer in behalf of the land. (2 Samuel 21:14)
Was the burial of Saul and Jonathan necessary in order for them to receive God's answer?
1 Kings 8: It seems that David is begging God to hear in response to honest prayer. God wasn't answering. David was begging Him to recognize true repentance and to react in a specific way. "When you hear, forgive."
2 Kings 19: Hezekiah is praying. Does this prayer follow the pattern of the Lord's prayer?
The book of Job is all about prayer, even when God seems far away. It is about remaining steadfast in prayer when everone else scorns God.
Jeremiah 7: God actually says He will not listen to a prayer.
Jeremiah 29: God instructs people to pray for prosperity in their city.
Pray for those who persecute you. (Matthew 5:44)
Matthew 6 talks about praying "in secret." There is a reason. When a person prays in front of people, he is focused on impressing the people, not on reaching God. Not only that, but he may also hold back in prayer because of perceived opinions of the people. God rewards what is done in secret because it is honest!
Be joyful in hope, patient in affliction, faithful in prayer. (Romans 12:12)
In the same way, the Spirit helps us in our weakness. We do not know what we ought to pray for, but the Spirit himself intercedes for us with groans that words cannot express. (Romans 8:26)
I urge you, brothers, by our Lord Jesus Christ and by the love of the Spirit, to join me in my struggle by praying to God for me. (Romans 15:30)
So what shall I do? I will pray with my spirit, but I will also pray with my mind; I will sing with my spirit, but I will also sing with my mind. (1 Corinthians 14:15)
Do not be anxious about anything, but in everything, by prayer and petition, with thanksgiving, present your requests to God. (Philippians 4:6)
Is any one of you sick? He should call the elders of the church to pray over him and anoint him with oil in the name of the Lord. (James 5:14)
Consider this in reference to "You ask and do not receive because you ask wrongly." Why do I want healing, and what will I do when God answers?
... And the prayer offered in faith will make the sick person well; the Lord will raise him up. If he has sinned, he will be forgiven. (James 5:15)
Sickness has many causes, including sin. Part of healing the sickness is forgiving the sin that caused it In order for that forgiveness to be received, the sin must be confessed and the person must be prayed for--preferably by the offended party.
Husbands, in the same way be considerate as you live with your wives, and treat them with respect as the weaker partner and as heirs with you of the gracious gift of life, so that nothing will hinder your prayers. (1 Peter 3:7)