Three times in this passage James warns his readers about the danger of being deceived (vv.16, 22, 26). His concern is not that they might be deceived by false teachers (though that is a concern behind many other New Testament letters), rather it is the danger of self-deception that he is anxious to warn about. Essentially in these verses there are two things he warns us against being deceived about: temptation (vv.13-18), an inner aspect of the Christian life, and religion (vv.19-27), by which he means the outward expression of Christian faith.
James has been talking about trials in vv.2-12, and has said they are a good thing in so far as they can be a means of real blessing to the Christian, not least in testing and maturing our faith. But though one possible outcome is a “crown of life” (v.12), another is death, because trials bring with them temptation: the trial of sickness might tempt one to self-pity, the trial of poverty might tempt one to envy, the trial of persecution might tempt one to compromise etc. Trials and temptations come together, but we need to understand that though God will use trials for our God, temptation springs from the evil desires of our own hearts. Blaming God for temptation for temptation is a way of shifting the blame (as is blaming our genes or our circumstances, which bare just more subtle ways of blaming God. That betrays a lack of understanding about ourselves and about God.
About ourselves because the reason we find sin alluring is simply because of our own evil desires. Those desires, as it were, flirt with our wills, and when our wills are seduced then sin is conceived. Responsibility lies firmly within (we can’t blame God or Satan), and the consequences are serious. The misunderstanding about God is addressed in vv.16-18. He is not some cruel deity, out to trip us up, he is wholly and consistently good. Our salvation is the great proof that God’s desire is not to lead us down the road that leads to death, but rather to bring us life.
James does not mean quite what we mean by “religion”. It’s not talking about some kind of churchliness, but simply the outward expression of faith. Religion to us smacks of mere outward form, but James assumes the inner reality of rebirth through the Gospel. The Word had been implanted (v.21), but James is concerned with what they now do with that Word, whether they live by it. So at the heart of this section is the paragraph vv.22-25, warning us not to be mere hearers of the Word, failing to apply what we learn. Blessing (v.25) is linked not to lengthy Quiet Times, or Bible Studies, or hearing excellent sermons, but to obedience.
Three specific areas of application are referred to in the final two verses, which will be expanded further later in the letter: (i) controlling the tongue, something which is also raised earlier in vv.19,20, (ii) helping the helpless, and (iii) avoiding moral pollution, also mentioned earlier in v.21.