2097 Thirdly, the Holy Spirit reproves the world by the judgment. This is because the ruler of this world is already judged. It is the devil who is the ruler of this world, that is, of worldly people. He is the ruler, not by creation, but by his suggestions and their imitation of him: "Those on his side imitate him" (Wis 2:25); "He is king over all the sons of pride" (Job 41:34). Therefore, this ruler is already judged, that is, cast outside: "Now is the judgment of this world," that is, in favor of the world, "now shall the ruler of this world be cast out" (12:31). He says this to anticipate ...the excuse that some will make for their sins, saying that the devil tempted them. He is saying in effect: They cannot be excused because the devil has been cast out by the grace and faith of Christ and by the Holy Spirit, cast out from the hearts of the faithful so that he no longer tempts from within as before, but from without. And so those who resolve to cling to Christ can resist. This is why the devil, who has conquered the strongest males, can be conquered by frail women. Thus the world is reproved by this judgment because being unwilling to resist, it is overcome by the devil, who although expelled is brought back by their consent to sin: "Let not sin therefore reign in your mortal bodies" (Rom 6:12).
Another explanation is in the book, The Words of the Lord. It says here that the phrase, is already judged, refers to the judgment of condemnation. That is, the ruler of this world is already condemned, and consequently all who adhere to him: "Depart from me, you cursed, into the eternal fire prepared for the devil and his angels" (Mt 25:41). The world is reproved by this judgment because although the world knows that its ruler has been condemned, it has not escaped from this judgment but is judged with its ruler, because it imitates his pride and evil ways.
Source: Commentary on John