Most typically we see Jesus already knowing what is in a person's heart and it is requests for healing that provoke a proclamation that sins are forgiven.
Confessing one's sinfulness, as in Luke 5:8:
When Simon Peter saw it, he fell down at Jesus' knees, saying, Depart from me; for I am a sinful man, O Lord.
is essentially saying the same thing about one's condition as God says...it is to agree with God's diagnosis. One cannot even apprehend one's need for Christ apart from apprehension of one's desperate disposition as thoroughly sinful. This is why the tax collector went home justified in the parable from Luke 18:
Two men went up into the temple to pray; the one a Pharisee, and the other a publican. The Pharisee stood and prayed thus with himself, God, I thank thee, that I am not as other men are, extortioners, unjust, adulterers, or even as this publican.
I fast twice in the week, I give tithes of all that I possess. And the publican, standing afar off, would not lift up so much as his eyes unto heaven, but smote upon his breast, saying, God be merciful to me a sinner. I tell you, this man went down to his house justified rather than the other: for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted. - Luke 18:10-14
Additionally James 5:16 exhorts us to confess our faults to one another:
Confess your faults one to another, and pray one for another, that ye may be healed. The effectual fervent prayer of a righteous man availeth much.
We are to live open and honest lives before one another, not treasuring up sinful desires that separate us as we strive to keep things hidden. Honesty in discourse with our brethren promotes an environment wherein correction and encouragement in the Lord may flourish and the body of Christ strengthens and grows. It is no good to pretend that we are not broken.
Some denominations sacramentalize and formalize the process of confession such that times of confession, methodology of confession, and the person to whom confession must be made are tightly controlled but this practice is difficult to root in Scripture since the temple priesthood is over.