There's a lot of debate about what the better option is. If I capture a lot of enemy troops I tend to kill them, as even if I have to face them again they will inflict kills that will take time and money to replace so it could actually cost me more money than I make in ransom.

also, I tend to kill when I'm invading someone elses territory and it'll be harder to get reinforcements, and ransom when defending my own lands which are easier to resupply.