1 John 5:16
 If anyone sees his brother committing a sin not leading to death, he shall ask, and God will give him life—to those who commit sins that do not lead to death. There is sin that leads to death; I do not say that one should pray for that.  All wrongdoing is sin, but there is sin that does not lead to death. (ESV)
What do we usually do when we see a brother or sister involved in a sin? We might tell everyone we know. That makes for very juicy gossip. Perhaps, we pat ourselves on the back, thinking, "I'm not doing that sin." Sadly, far too many Christians do these things instead of what the Apostle John is instructing. If you see your brother committing a sin, pray to God on their behalf!
The confusing part of these verses is this description of a "sin not leading to death." What does this mean? Are we in danger of God killing us every time that we sin? Certainly, God is able to bring whatever justice he desires against anyone, including their physical death. Perhaps you remember the story of Ananias and Sapphira in the Book of Acts, Chapter 5. They lied to the church, and God struck them dead.
There is a level of spiritual rebellion in a person's heart that our prayer cannot touch. Those who have so closed their heart off to the work of the Holy Spirit will ultimately reach their own demise. But, I am convinced that God's grace is far greater than our sin. The accounts of God bringing physical death for sin are exceedingly rare.
So, what should you do when your brother is committing a sin? Pray! Pray that they will change their direction. Pray that God will soften their heart and show them their sin. Pray that you do not get enticed into joining them in the same sin. Pray that God will use you to lovingly and humbly show them the error of their ways. Pray!
Sin is serious stuff. We are to no longer live in it. Pray that God will help you to walk in purity. When you see others struggle, PRAY!