These are the things that affect the amount you get from what I've found:
1) the size of the foe's army... the bigger they are, the harder they fall
2) The amount of money they have... the bigger the wallet is, the faster it falls
3) how much dammage you do of your max... the bigger you are, the harder you kick them (as we all know, the damage you do varies from time to time... the more you do with given amount of weapons the more money you get)
4) the more damage the enemy does... the.. ehhh... nope no idea :huh:
3+4 = if you do more damage and the enemy (or should i say victim?
) does more damag, you get more money...
This is how i choose who to attack:
# Soldiers Min cash (X1000 gold)
200 or more 200
150-200 300
100-150 400
70-100 500
40-70 600
this will almost always gurantee at least 10K per attack turn (that is if the Min cash is what left after the attack)