James 5:16-18

Verses 14, 15, fully present the blessing which rested on the assembly, and the honor God put on the elders. They were encouraged to pray for the sick and assured that the prayer of faith should heal him, and the Lord raise him up. The added clause took notice of sins done, which might trouble the heart, but it assures forgiveness. This leads to a more general statement which follows.
“Confess therefore your sins [or, “offenses” as in the common text] to one another, and pray for one another, that ye may be healed. A righteous [one's] supplication hath much power if it work. Elijah was a man of like passions with us, and he prayed prayerfully that it might not rain; and it rained not on the earth for three years and six months. And he prayed again; and the heaven gave rain, and the earth sprouted forth its fruit” (vers. 16-18).
Here we find Christians exhorted, where failure came in, to confess their sins mutually, and so to pray, that healing might be granted. For there is a divine government which has ever thus dealt with the saints here below, as we may see in the Psalms as well as in the history of the ancient people of God. So there was outside Israel, as in the book of Job. Neither the gospel nor the church has changed this. The saving grace of God has appeared, as it did not till Christ and His work; but as surely as we call on a Father, He judges without respect of persons according to each one's work, as the Lord taught the disciples in John 15. Sovereign grace abides in all its efficacy; but God does not fail in faithfulness to deal with us if unfaithful. We are therefore enjoined to pass the time of our sojourning in fear, not as if we doubted but on the contrary as knowing consciously that we were redeemed with Christ's precious blood as of an unblemished and spotless lamb.
This is the more consolatory in the present anomalous state of Christendom, where tradition has wrought boundless havoc with the truth, and ecclesiastical order has been swamped with inventions of men to please human activity and hide the ruin which lawlessness has everywhere brought about. Properly elders needed apostolic authority, direct or indirect. Where this was not, and elders were lacking or even men not easily found who had the qualities on which the apostle insisted to Timothy, the saints could and ought to confess their sins to one another with prayer; nor would the Lord's grace fail toward the need. A righteous one's supplication avails much, where really at work.
For this Elijah is cited, as one of like nature with ourselves, as indeed his inspired history reveals. But it also reveals how, as a judgment of God, rain should not fall for three years and six months because of a people rebellious and even apostate. Here we have, not the solemn sentence the prophets pronounced from God, but the inner work in the soul which preceded it, for which we are wholly indebted to this Epistle. He prayed again, and the heaven gave rain, and the earth sprouted forth its fruit; but we learn this second praying in the history as well as in the Epistle. Miracles it is a proud unbecoming thought to expect in the actual confusion that exists, yet with God and His word acknowledged. But God hears prayers with fatherly pleasure, and never fails to answer that which faith pours into His ears.