Main point summary
Definition of true religion rests on the concern for others, not yourself, and thinking, feeling and doing not according to trends of the world.
If anyone thinks he is religious
Consider this distinction about characteristic of being religious:
q and does not bridle his tongue
if you do not control you tongue
but deceives his heart,
and make your heart being self-deceived by your flesh
this person’s r religion is worthless.
then this religion is empty. It has no righteous content within itself.
Religion that is pure and undefiled before God, the Father, is this:
God the Father counts true religion pure and spotless by this traits:
s to visit t orphans and widows in their affliction,
 concern of the ones who are in need and cannot take care of themselves in their afflictions. Namely widows and orphans.
and u to keep oneself v unstained from the world.
 and self-control regarding inclinations, love, passion, peace to the things of the world.
What is a nature of true religion that pleases God? James in these verses gives us two approaches to the matter of true religion. First one clearly examines not works of religion which you can counterfeit, but inner characteristics of a person who thinks of himself as religious.Namely they are issues of tongue, on which he will expand more latter in the epistle and deceiving of the heart. Why tongue? What you speak with your tongue is a presentation of what you think and feel with your heart. Consider words of Jesus in Matt. 12:34 "For out of the abundance of the heart the mouth speaks". What my heart treasures the most and what I feel about it I will express outwardly in my relationship with God and others. I can fake my religious actions, practices and even my speech but God knows the one's heart. So basically what is on my mouth is a picture of my love not to word of God, which James points to in previous verses, but to desires of my flesh. So then comes next - deception. If I think of religion (in my Russian bible religion is translated like godliness) in terms of "not bridle my tongue" I deceive my heart. The root of this in contradiction between being religions and being irresponsible on one's tongue. It just cannot be this way. They cannot co-exist together. And if you think that true religion exists along with your unclean tongue, and then thoughts and feelings - you have been deceived. It bring us to conclusion - this kind of religion is worthless. You cannot do anything with it. It has no use at all. It is like a cookie jar but there is no cookie left but only a jar. There is no righteous content in this religion. Now, James gives us an idea, insight of what religion before God is pure and undefined. It is crucially important. Not what I think of pure religion but what God thinks, what He considers it to be. Because I can be very relative in defining what is true in this case. But God is not relativistic. He is absolute. So the most correct and absolute truth about religion comes from God the Father. First, it is concern for others. Specifically for those who are in need. Orphans and widows in James time did not have social security or any help from the government. So in church, one of the way to practice true religion would be care for these groups of people. Show Christ to them, good attitude, mercy. compassion. Because all of that Christ showed to you on the cross. It is easy to care for those who does not need one. Almost the same picture as what is the point to love those who love you? Try your enemy - that is quite a challenge! Second, it is keeping yourself unstained from the world. The word "world" might be understood in different ways. One of the great explanation is in 1 John 2:15. In this text I think to be unstained from the world means the same what 1 John - you live in this world, which God created, you use things of this world, but you do not have any intimate relationship with sinful values in this world. You do not go to monastery as ascetic. You stay and proclaim what is truth via your pure religion. But you do not love world's desires. That is why I put self-control in my paraphrase here, because it is a mean of grace, fruit of the Spirit to be able to keep yourself unstained from the things of the world. May God bless us pursue true and pure religion in our walk with him!