Pilate told them, “Take him yourselves and pass judgment on him according to your own law!” The Jewish leaders replied, “We cannot legally put anyone to death.” (Jo 18:31 [NET])
Jesus had escaped from a stoning in John 8:59.
Then they picked up stones to throw at him, but Jesus hid himself and went out from the temple area. (Jo 8:59 [NET])
After a time in the ministry, Jesus becomes a greater prophet than John the Baptist, would not be legal for Jews to kill a man, disobeying God's commandment: Thou shalt not kill. Jesus was respected by the Jewish nation in John 18:31.
They wanted to arrest him, but they were afraid of the crowds, because the crowds regarded him as a prophet. (Mt 21:46 [NET])
The process of an adulterous woman must be seen in light of Deuteronomy 13: 8-10
You must not give in to him or even listen to him; do not feel sympathy for him or spare him or cover up for him. Instead, you must kill him without fail! Your own hand must be the first to strike him, and then the hands of the whole community. You must stone him to death because he tried to entice you away from the LORD your God, who delivered you from the land of Egypt, that place of slavery. (Dt 13:8-10 [NET])
To extend my question a bit, I'd like to understand:
1) Was stoning to death legal in Jesus' days under Jewish and Roman law?
2) How frequent were death sentences?
1) Which crimes could lead to capital punishment?
1) Yes.
Jesus was teaching daily in the temple courts. The chief priests and the experts in the law and the prominent leaders among the people were seeking to assassinate him, but they could not find a way to do it, for all the people hung on his words. (Lc 19:47-48 [NET])
The chief priests and the experts in the law were trying to find some way to execute Jesus, for they were afraid of the people. (Lc 22:2 [NET])
2) Regular.
The Jewish leaders picked up rocks again to stone him to death. (Jo 10:31 [NET])
3) All.
The Jewish people had Jesus as a prophet, therefore, could not be killed for blasphemy by the Jews, unlike the adulterous woman.