I'm beta-testing a game that is currently a simple version of Solar Realms (Star Empire Elite), and I started by using something similar to Amit's equations (above). In particular, I liked the idea of having three phases to the battle, where you had to win two of the three. But I also wanted to introduce an element of randomness into the battle, and for that I was influenced by some tabletop games.
Processing is a concern if the game is to scale, so I didn't want to follow the method suggested by sum1stolemyname above, although if your game is using the client to process the results, as opposed to a server, this seems to be a good approach.
I decided to break the battle into two phases (analogous to the three in Amit's model): air and ground. I calculate the attack and defend strength, and adjust the attack strength down by a fraction (to give the defender the advantage). At that point, if the attack strength and the defend strength are equal, the attack has a 50% chance of victory. From there, I adjust the percentage chance of victory up or down based on how much more (or less) strength the attacker has compared to the defender. Here are some simplified equations for air:
air_attack_strength = 1 * soldiers + 10 * fighters
air_defence_strength = 2 * soldiers + 25 * stations
differential = (air_attack_strength - air_defence_strength) * constant
chance_of_victory = 50 - differential
I specify that the chance_of_victory can never be larger than 80 or less than 5. From there, I just generate a random number out of 100, and then carry forward that result to the land battle.
One thing I have not solved to my satisfaction is the casualty rates. But I'm thinking that a good way to figure this out would be to compare the chance_of_victory to the random number generated, and use that to take a fraction of the attacking-defending forces as casualties.