The prayer of a person in right relationship with God is effective

Scripture reference

James 5:16–18 (ASV)

16Confess therefore your sins one to another, and pray one for another, that ye may be healed. The supplication of a righteous man availeth much in its working. 17Elijah was a man of like passions with us, and he prayed fervently that it might not rain; and it rained not on the earth for three years and six months. 18And he prayed again; and the heaven gave rain, and the earth brought forth her fruit.

Stories

The people of Shan Tung province were desperate for rain. For weeks they made sacrifices and offered prayers to their rain god, but to no avail. Ultimately, giving up, they threw the idol in a ditch. At the same time the Christians of the area had been praying for rain and were discouraged that their prayers also brought no rain. In a purposefully public demonstration of James 5:16-18, Miss Vaughan led the believers to seek right relationship with God through repentance, which resulted in a dramatic answer to prayer.
Realizing that they had erroneously cut off from God to focus only on controlling rampaging locusts from eating their crops, Chen called his entire family and led them to make their ways right with God before praying for a paralyzed child in the family. Their prayer was answered as the boy who could not leave his bed was out running!
For George Müller, nothing was too big or too small to be a subject of prayer. Fervently he sought God, not only for men to give to the work, but to know when to accept or not accept gifts, however large they maybe.
The prayer life of a Bible-woman and the remarkable results, along with the lives of George Müller and Hudson Taylor, were a great encouragement Marie Monsen. She learned from them that a life of faith in God was possible and could be lived!
When a sum of three thousand dollars was stolen from the Consumptive's Home, leaving them with not a penny, they turned to the Lord and pleaded His promise that "if ye abide in me, and my words abide in you, ye shall ask what ye will and it shall be done unto you." The promise of the amount was made to be paid out on a certain day, and before it arrived, the Lord had sent the three thousand dollars through unusual contributions, fulfilling His promise. And to the shame of the devil, sympathy for the institution after the robbery became known resulted in even more contributions than the stolen amount, turning the adversity into a blessing.