You are allowed to transfer a maximum of ten units. The computer will fill the slots starting with higher level units and going down from there. The best way to determine the units you want to take with you is to disband every high level unit that you don't want along before killing the last enemy leader (unless you need them to take out the leader's support stack after which they should be killed or disbanded). When the computer makes the choices, it gives no consideration at all to whether a unit has medals or not. I've seen an unmedaled dark elf rider get picked over a gold medal orc cavalry, which caused an immediate incantation of the spell 'Reload' and subsequent disbanding of the offending darkl elf. I don't know how the AI prioritizes units of equal level (do I want an orc warlord or a doom bat), but it does not do a very good job of it.
Managing a good balance of units will make the campaign rather easy, even on the hard setting. I never took any heroes with me, since I got much better results with a carefully managed band of lv 2 and lv 3 units that gave me a very strong start in most scenarios. The lv 4 units (as well as heroes) tend to cost the same as two or three very good lv 3s, so the choice was obvious for me. Maybe it's my style of play.
And a warning for those playing either the dark elf path of the Cult of Storms or the undead path from either Keepers or Cult: an incarnate must be in its natural form to be transferred. If you try to transfer a possessed unit, you will only pay the price of that unit, but the incarnate gets left behind. This is the only known way to depossess a unit that has been taken over by an incarnate.
Daveman, perhaps you should add this to the FAQ (albeit in a more coherent form?)