Our group has had the situation of capturing evil character(s) happen all the time.
If time and circumstance allows, we turn them over to the proper authorities to do with what they will.
If time and circumstance doesn't allow, depending upon the party level and resources, we have done the following in the past.
Used Suggestion, Charm Monster or Dominate Person/Monster as a control mechanism. Usually suggestion/charm/dominate them and send them on their way, usually with an order to turn themselves in to the authorities.
We have use Geas on special prisoners.
When the above methods aren't possible, our party has cut off the thumbs (assuming they have thumbs) of the evil prisoners and sent them on their way. Evil spellcaster have their tongues split.
Why thumbs.... try swinging a sword, picking a lock or casting a spell without an opposable thumb. It is nearly impossible or very problematic to do any serious adventuring type things without thumbs. A split tongue allows a person to eventually learn to talk properly, but only after some time. In the meantime, it prevents proper pronunciation of verbal spells and command words.
A minor maiming is preferable over outright butchery of prisoners - the prisoner gets to live and go free and with time, can learn to cope with or overcome the handicap.
YMMV.