"Do not judge so that you will not be judged. For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you. Why do you look at the speck that is in your brother's eye, but do not notice the log that is in your own eye? Or how can you say to your brother, 'Let me take the speck out of your eye,' and behold, the log is in your own eye? 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."
First, Christ is here speaking of Christians judging other Christians. The word "brother" demonstrates this: Christians are children of our Father in heaven (Matthew 5:16,45,6:1,7:11); non-Christians are children of their father the devil (John 8:44; Acts 13:10; 1 John 3:10). We are not brothers. What this means with respect to your question is that the passage has nothing whatsoever to do with Christians judging non-Christians.
Second, Christ is here condemning only hypocritical judgment. Note that after the one judging corrects his own behavior, then he is actually SUPPOSED TO judge and correct his brother's behavior. What this means with respect to your question is that Christ is not giving a blanket command to pass absolutely no judgment ever -- rather He is commanding us not to be hypocrites when we do judge.
Never take your own revenge, beloved, but leave room for the wrath of God, for it is written, "VENGEANCE IS MINE, I WILL REPAY," says the Lord.
Here we have a command not to take matters into our own hands apart from the command of God, but rather to wait on and obey the Lord. If God condemns a nation, for example, and decides to take vengeance upon them by having a group of His people attack and destroy the nation, then His people should attack and destroy the nation as God Himself has commanded them to. God frequently uses His people as instruments of His vengeance (Deuteronomy 7:1-2; 1 Samuel 15:2-3).
On the other hand, if I decide that I don't like someone, that I believe someone has wronged me, and therefore that I should attack them, and God has not commanded me to do so, then I am in disobedience, taking vengeance into my own hands.
What this means with respect to your question above is that if we are commanded by God to kill someone as a punishment, we should kill them. If God has not commanded us to, then He has actually commanded us not to, and we should not.
However, my answer to your earlier question had nothing to do with whether or not we ourselves should execute homosexuals, but rather it spoke to the issue of "what is it that homosexuals (and indeed all of us) actually deserve?"
What we all actually deserve for our crimes against God is in fact death (Romans 3:23,6:23).
Praise God that He has offered us forgiveness through Jesus Christ (Acts 10:43)!