Most, if not all Christians find great comfort in the above mentioned passage, which is all right and very good! We should, as Christians, find much comfort: but even more, an assurance in those words. I think that many well-intentioned Christians have used this verse in the manner of Jonathan Edwards in his 'hell-fire and brimstone' sermon, 'Sinners in the Hands of an Angry God' ( this is just one outworking, and really, maybe, just the beginning of the 'going to heaven when you die' mentality ). To be fair to those ( many ) Christians; I will humbly admit that, as John clearly says, we must confess ( and repent of ) our sins if our sins are ( to be ) forgiven.
From the very beginning of John's letter; he seems to be reminding his people ( the Jews ) of the grace of God, manifested in the flesh through His Son Jesus and His Holy Spirit. Could we not assume here ( safely ) that John is doing the same in the remainder of this first chapter? The Jewish people had heard, if not received, this good news of the Gospel from Jesus Himself: they had already heard ( and accepted, in some cases ) this 'formula' at the hands of Jesus and His apostles; why, do you think, would John feel the need here to repeat what they had already heard? Obviously because some had not accepted this doctrinal teaching, although some had, and I believe, as we can see from the very first verse of the next chapter ( 'my little children' ) that John was writing primarily to the latter group here, those who had received this Gospel, confessed and repented of their sins, and been forgiven and cleansed.
My main reason for writing here, is to encourage my readers to realize that John's admonition, in this passage, is a reminder of what has transpired, rather than a 'formula' to be followed every time that we fail to follow our Lord's example. Should we confess our 'sins' to our heavenly Father, and even to each other? Certainly we should!
In the fifth chapter of James' letter to these same people; he instructs them to,
16 Confess your trespasses[e] to one another, and pray for one another, that you may be healed. The effective, fervent prayer of a righteous man avails much.
Paul, in Romans 10, speaking to this same people; says that,
'if you confess with your mouth the Lord Jesus and believe in your heart that God has raised Him from the dead, you will be saved'.
The forerunner of Jesus, the Christ, taught his listeners that they should confess that they had sinned, repent, and be baptized. Confession ( of sins ) is a fairly common theme throughout the Hebrew Scriptures, particularly in places like Leviticus 5:5, I Kings 8:33-36, II Chronicles 6:26, Ezra 10:9-11, and Proverbs 28:13 give us but a few examples of this; while we find in passages like Leviticus 26:40-42 almost the same language that John uses in his letter.
Unfortunately; many Christians have shuddered under the load that if they did not confess their sin 'at every turn' that Jesus would not forgive them of that sin, and cleanse them from all unrighteousness, and while it is true enough that our sins are not forgiven if we 'founder' willingly in the 'sea' of sin and lust forever, not admitting that we have sinned, and not turning from that sin: it is obvious ( to me ) that John's words in the 9th verse are words, more of absolution than of how we are forgiven ( I don't think that he is ' merely' repeating the Gospel! ). One of my favorite passages, in the Hebrew Scriptures is Ezekiel 36:25-27: while it is certainly implied ( 'you will keep My judgments and do them' ), in verse 27 that His people would confess and repent, turning from their sins, it is by no means spoken of as prerequisite for God cleansing them; in fact, before His people are told that they will do His will, He tells them that He will first cleanse them, giving them a ( made ) new heart, and giving them of His Spirit!
David pleaded with God, in Psalm 51,
Wash me thoroughly from my iniquity, And cleanse me from my sin.
In Jeremiah 33; still speaking of the restoration of His people; God spoke these words through His servant;
6 Behold, I will bring it health and healing; I will heal them and reveal to them the abundance of peace and truth. 7 And I will cause the captives of Judah and the captives of Israel to return, and will rebuild those places as at the first. 8 I will cleanse them from all their iniquity by which they have sinned against Me, and I will pardon all their iniquities by which they have sinned and by which they have transgressed against Me.
More comforting ( to me, anyway ) is the thought that since God has cleansed us, has given us a new heart, that we do confess our sins, we do repent of our wickedness, and turn, doing His will, His works! We are not forgiven of our sins and cleansed from all iniquity because we confess our sins and repent of our wicked works; rather the other way around: we are enabled to confess and repent because we have been forgiven and cleansed!
Finally; in Mark 5, we see that Jesus healed a man, paralyzed, being carried on a stretcher.
5 'When Jesus saw their faith, He said to the paralytic, “”
Both Matthew and Mark record that when Jesus saw the faith, not of the paralytic, but of the men who brought; He healed, not only his physical body, but his spiritual body: 'Son, your sins are forgiven you'. I don't think that these men even thought of this man being healed spiritually; but maybe they did: they knew the Scriptures!
May God give us all comfort in knowing that our sins are forgiven, and we are cleansed from all unrighteousness; for Jesus paid the penalty for those sins, and gave us a ( made ) new heart, putting a right Spirit within us!
In His service, and for His glory,