John 16:
7 Nevertheless I tell you the truth; It is expedient for you that I go away: for if I go not away, the Comforter will not come unto you; but if I depart, I will send him unto you.
8 And when he is come, he will reprove the world of sin, and of righteousness, and of judgment:
9 Of sin, because they believe not on me;
10 Of righteousness, because I go to my Father, and ye see me no more;
11 Of judgment, because the prince of this world is judged.
The Comforter reproves (convicts; brings in guilty) the world of sin and vs 9 tells us the sin for which the world is convicted --- because they believe not on me. Those who do not believe on (or in) the Lord Jesus Christ are convicted of sin.
The Comforter reproves the world of righteousness because those who do not believe in the Lord Jesus Christ deny his resurrection and ascension. By the standard of the world at the time the Lord Jesus Christ spoke those words, the pharisees were righteous, while the Lord Jesus Christ was rejected and crucified. In righteousness, He was removed from the earth. To this day, the world calls evil "good" and calls good "evil".
The Comforter reproves the world of judgment because the prince of this world is judged (vs 11). In John 12, we read these verses:
26 If any man serve me, let him follow me; and where I am, there shall also my servant be: if any man serve me, him will my Father honour.
27 Now is my soul troubled; and what shall I say? Father, save me from this hour: but for this cause came I unto this hour.
28 Father, glorify thy name. Then came there a voice from heaven, saying, I have both glorified it, and will glorify it again.
29 The people therefore, that stood by, and heard it, said that it thundered: others said, An angel spake to him.
30 Jesus answered and said, This voice came not because of me, but for your sakes.
31 Now is the judgment of this world: now shall the prince of this world be cast out.
32 And I, if I be lifted up from the earth, will draw all men unto me.
33 This he said, signifying what death he should die.
34 The people answered him, We have heard out of the law that Christ abideth for ever: and how sayest thou, The Son of man must be lifted up? who is this Son of man?
35 Then Jesus said unto them, Yet a little while is the light with you. Walk while ye have the light, lest darkness come upon you: for he that walketh in darkness knoweth not whither he goeth.
36 While ye have light, believe in the light, that ye may be the children of light. These things spake Jesus, and departed, and did hide himself from them.
37 But though he had done so many miracles before them, yet they believed not on him:
Clearly, the ministry of the Comforter is to reprove the sinners of this world.
Believers are chastened and rebuked by Father because He loves His children (Heb 12:5,6). And as we endure the chastening by Father, afterward it yieldeth the peaceable fruit of righteousness unto them which are exercised thereby (Heb 12:11).