John assures us that if we sin, if we are christian we have one who speaks to the father in our defense Jesus Christ, is on our side!
The comfort comes in, in knowing that as human we are not perfect and will sin at some point, upon repentance we are forgiven.
We are encouraged to be Christ like in our walk,and without sin, Jesus paid the ultimate price for us, with His life.