Part 1 verse 26
The word 'religious' (Greek:threskos) refers to external observances.
The word 'worthless' (Greek:mataios) means 'fruitless or useless' and the word 'deceives himself' (Greek:apaton kardian heautiu) literally means 'to mislead and to seduce his own heart'.
The Bible is teaching us here that a religious man that God is pleased with is a person who can controll what he/her say and how he/her say it. We should know that what comes out from an person's mouth comes from the heart. Matthew 12:34 says "For out of the overflow of the heart the mouth speaks. " and then goes on to say that a good man brings out the good that is stored in him and an evil man brings out the bad that is stored in him.
Part 2 verse 27
The Bible teaches us that God wants us not to pratice Christianity as a form of a religious ritual but to focus on living our lives right before Him. By our conduct of serving others and by keeping our character from being influenced by the world, that is the kind of religion that God is pleased with.
The 'world' here refers to 'anything that is contrary to the word of God'.
The Lord here is contrasting between mere ritualistic observances and real authentic acts of love to show us that what people commonly know as religion is not just a form of worship but a real lifestyle of right living and servanthood.
Important Note :
I have chosen based on my study from 'The Bible Knowledge Commentary' by John F.Walvoord and Roy B.Zack and selectively re-typed some of the more important parts, together with some of my own additional explanation to make this study simpler to digest and understand. My re-phrasing does not show a different meaning to what was originally written.