It goes to the one who left the best impression, so it varies. As a rule, I try to comm DPS, the underappreciated heroes (at least ones that can dish out some sick damage)
-If someone is cracking jokes and has a good attitude, it will often go to them, at least if their performance was decent.
-If everyone is silent, I will give it to DPS who did the most, unless the Tank/Healer did something particularly impressive. If I am also a DPS, I will usually give it to my partner if they were good.
-If the healer is going balls to the wall on their DPS while keeping everyone up, will likely give it to them.
-Tank rotating his cooldowns well and keeping his buffs/debuffs up, may give it to them.
-Oh, a Bard that sings or a Dragoon that actually combo's Ring of Thorns are in the serious contender for getting a comm, I almost never see it in the DF (though I sometimes see BRDs singing something like Ballad when no one needs it and where Requiem would be much more effective)
-If no one did a particularly good job and were silent the whole run, I generally won't comm anyone.
I almost never give comms based on names or appearances, though I did give one to a Highlander wearing shades named Arnold Schwarzenegger purely based on that fact.