This is one of those passages which demonstrate so powerfully the interconnectedness and unity of the Trinity, the Three acting completely in accord with each other!
The Disciples are grief stricken as they begin to comprehend that they will be losing Jesus, but He reminds them that this will be to their advantage and a blessing to the world. Someone asked me a few months ago if it wouldn't have been so much better if Jesus could have carried on living for centuries and I used this passage as reference when I told her that the Holy Spirit coming opened up Christianity to the world; Jesus living in a physical human body was always limited by what He could achieve in a day. It must have been a source of frustration for Him when He recognised that He couldn't heal everyone, His message limited by how far He could raise His voice. Remember that power went out of Him as He healed and that He had to raise His voice to be heard in the busyness of Jerusalem?
The Holy Spirit is to come and John describes what His work will be perfectly. He writes using a word which described in Greek the cross-examination of the person's mind and heart, convicting a person of where they have gone wrong and convincing them of the need for repentance. One of the clear signs for us of someone experiencing the power of the Holy Spirit is their sense of personal sin. Along with that, the Holy Spirit gets across the righteousness of Jesus Christ, so alongside despair at one's own sin, there is also the hope that arises from knowing that there is someone who can take away their guilt. That produces judgement: how we respond to the Holy Spirit determines how we will be judged. We will not be judged by our deeds, good or bad, to the point that it will determine whether we receive eternal life with the Father or not, but we will be judged by our response to the Holy Spirit. Remember Jesus declared that the only unforgivable sin is blasphemy against the Holy Spirit, that is stating that He is not God by our action of rejection. Matthew 12:30-32: "Whoever is not with me is against me, and whoever does not gather with me scatters. And so I tell you, any sin and blasphemy can be forgiven. ... And everyone who speaks a word against the Son of Man will be forgiven, but anyone who blasphemes against the Holy Spirit will not be forgiven."
Are you willing to receive the Holy Spirit? Have you repented-that is, turned around-to see the full beauty of the Divine, the beneficence of God shining down on you? He chooses not to judge you, but to welcome in to His Kingdom all who would turn to face Him!