The whole story of 'the woman taken in adultery' is fascinating (see below); but its core seems to be in the phrase He that is without sin among you, let him first cast a stone at her.
This is contrasted with I think Jesus is Moses in the law commanded us, that such should be stoned: but what sayest thou?
So, the essence of what is going on here is the clash between the law: objective and public definitions of behaviour versus subjective, private and motivational facts. When Jesus says that only he that is without sin is entitled to stone the women; he is saying that the motivational state of a person is what makes an act good.
Even when a law comes from Moses, and even when its transgression is certain, and when there is a prescribed punishment... this way of morality is not Good. Jesus is pointing out the evil motivations of the people who want to stone the woman; and on reflection each potential stoner recognises this fact; and recognises that this evil motivation (vengeance, disgust, sadism, lust... whatever it may be) destroys the rightness of inflicting the punishment.
Jesus is not discussing how to set-up a system of justice or how to run a society; he is talking about true morality; and making clear that true morality is Not a matter of having a set of rules and implementing them impartially and with factual correctness.
He is saying, instead, that true morality is a thing of Man, it is about the motivations of Man - and that Good morality is only to be found when a person's motivations are Good.
So, to be good, to do-good, a punishment - or any other kind of judgement - must be Not be 'implemented', but must come from a loving heart, and for the right reasons. Jesus is, here as in many other places, stating that The Law is Not the ultimate authority - but is on fact orthogonal (nothing-intrinsically-to-do-with) to Goodness.
The new dispensation of Jesus is that Goodness comes only from a loving heart: from right-motivation.
John: 8 Jesus went unto the mount of Olives.
2 And early in the morning he came again into the temple, and all the people came unto him; and he sat down, and taught them.
3 And the scribes and Pharisees brought unto him a woman taken in adultery; and when they had set her in the midst,
4 They say unto him, Master, this woman was taken in adultery, in the very act.
5 Now Moses in the law commanded us, that such should be stoned: but what sayest thou?
6 This they said, tempting him, that they might have to accuse him. But Jesus stooped down, and with his finger wrote on the ground, as though he heard them not.
7 So when they continued asking him, he lifted up himself, and said unto them, He that is without sin among you, let him first cast a stone at her.
8 And again he stooped down, and wrote on the ground.
9 And they which heard it, being convicted by their own conscience, went out one by one, beginning at the eldest, even unto the last: and Jesus was left alone, and the woman standing in the midst.
10 When Jesus had lifted up himself, and saw none but the woman, he said unto her, Woman, where are those thine accusers? hath no man condemned thee?
11 She said, No man, Lord. And Jesus said unto her, Neither do I condemn thee: go, and sin no more.
12 Then spake Jesus again unto them, saying, I am the light of the world: he that followeth me shall not walk in darkness, but shall have the light of life....