It is not enough to say a prayer, but we must pray in prayer. Our thoughts must be fixed, our desires firm and ardent, and our graces in exercise; and, when we thus pray in prayer, we shall speed in prayer. Elijah prayed that it might not rain; and God heard him in his pleading against an idolatrous persecuting country, so that it rained not on the earth for the space of three years and six months. Again he prayed, and the heaven gave rain, etc. Thus you see prayer is the key which opens and shuts heaven. To this there is an allusion, Rev. 11:6, where the two witnesses are said to have power to shut heaven, that it rain not. This instance of the extraordinary efficacy of prayer is recorded for encouragement even to ordinary Christians to be instant and earnest in prayer. God never says to any of the seed of Jacob, Seek my face in vain. If Elijah by prayer could do such great and wonderful things, surely the prayers of no righteous man shall return void.
Matthew Henry, Commentary on James 5