Love is often used in the same breadth with judge, as in we should not judge, but just love people. But, biblically speaking, we are unable to love without making a judgment.
I Corinthians 13:6 tells us plainly that, "[Love] does not rejoice at wrongdoing, but rejoices with the truth." What is wrongdoing? Wrongdoing is sin, transgression, iniquity, trespass, etc.
Jesus never said to love and never judge. That is a fallacy made by people who want to look better than others by taking part in the PC era where everyone must accept everyone else's lifestyle without criticism. But Jesus never meant it that way.
It is true that Jesus said, "Judge not, that you not be judged" (Matthew 7:1). But he didn't leave it there. Notice that in verse 5 he followed up his command with this: "You hypocrite, first take the log out of your own eye, and then you will see clearly to take the speck out of your brother’s eye." Notice the two things that Jesus said.
First, he said, "You hypocrite." This signifies that Jesus is condemning judging someone while those who judge are guilty of the same or similar sin. Otherwise, why mention hypocrisy? Second, "Then you will see clearly to take the speck out of your brother's eye." In other words, you will be able to judge with a righteous judgment.
Jesus has already pronounced judgment. In John 3:18-19 he said, "Whoever does not believe is condemned already, because he has not believed in the name of the only Son of God. And this is the judgment: the light has come into the world, and people loved the darkness rather than the light because their works were evil." Yes, Jesus loved. But he also defined evil and called it what it is. He judged.
According to Jesus, the world (that of sin) already stands condemned. So, when we pronounce sin as sin, we are not saying something new in terms of condemning anyone. We are simply defining sin and stating its reality, that sin brings condemnation. But Jesus brings forgiveness and life—but not without repentance. Without repentance, no one can experience God's love and forgiveness.
Someone might say that Jesus could judge because he was the Son of God—he had authority to judge. But we are not Jesus. But this position fails to recognize that Jesus is our model for how we are to live our lives. Jesus condemned sin, but also offered forgiveness. Then he demanded that we stop sinning. That is our model. We should identify sin, offer unmerited forgiveness as an expression of love, then insist that sin stop as part of experiencing a truly transformed life in Christ. Jesus did this (John 8:3-11). Paul did this (Romans 6:12-14). Peter did this (I Peter 1:13-22). John did this (I John 2:1-6). James did this (James 4:1-10). We must also do this.
If we truly love the person who sins we will not celebrate that sin, or give approval to that sin, or silently excuse it. Love, as Paul said, rejoices with the truth. Confront sin, lovingly, then offer the hope we have in Christ. Then you can be sure that you have judged rightly.