It would be pretty hard to argue (from the perspective of a modern person) that Socrates deserved to be killed for what he was doing. After all, what was it that got him killed? It was because he challenged the conventional morality, government, and values of his society. In our society, this seems like a "crime" that is utterly undeserving of the death penalty.
The only way that I could at all defend this would be to argue that Socrates' crime was tantamount to treason. You could argue that what he was doing was undermining the whole basis of their society. If someone is trying to destroy your society, it is not unreasonable to kill them.
However, I don't really believe that. If someone is trying to verbally undermine your society, you don't kill them -- you argue with them.