Though he seems to be speaking about praying for those who are sick, the overall command is specifically to "pray for one another."
Further, James instructs us to confess our faults. The apostle does not mean that we should reveal every sin and foible to everyone in the congregation. He implies that we should confide our problems to a close, trusted friend so that he or she can help us by praying to God for help in overcoming it.
We should pray for one another, and it need not be known by others or even asked of us. We may notice a brother struggling with a problem, and rather than pointing out his flaw to others, we should get on our knees to petition God to come to his aid. The apostle James assures us that such a prayer, given seriously and thoughtfully, will make a difference.
The Jews say regarding prayer: "He who prays surrounds his house with a wall stronger than iron." Another of their sayings runs: "Penitence can do something, but prayer can do everything." To them, prayer is nothing less than contacting and employing the power of God; it is the channel through which the strength and grace of God is brought to bear on the troubles of life.
In the next two verses, James uses the illustration of Elijah to show just how effective righteous prayer can be. He chose Elijah because the biblical story of this prophet brings out his passionate - and sometimes still carnal - nature. Nevertheless, he prayed earnestly for drought, and God responded: No rain fell on the earth for three years and six months! When he prayed again for rain, God again heard and acted. What tremendous power can be unleashed through prayer that conforms to the will of God!
James 5:19-20 continues the theme. If we see a brother straying from the truth, and with the help of prayer, restore him to a right understanding, we may indeed be saving him from the Lake of Fire, from the second death! Such loving help is the essence of true outgoing concern.