If you are playing with people who are your friends in real life, you must remember - VGA Planets is not "real life". It is a game, and in this game you must be cagey, strategic, elusive, honest, loyal, deceitful, and an outright bastard...just not all at the same time. :-)
Of course we've all played video games where you kill your friends (Doom, Quake, etc), but it is more uncommon for us to have played games where you have told a friend straight-faced "i will help you", and then double-cross them and selling them out to the enemy. You don't want to be deceitful to your friends, but that's part of the game, so when dealing with your friends in the context of the game, play the role of the race you're playing dealing with the other race instead of one friend dealing with another.
"Diplomacy is the art of lying for your country"
- Ambrose Bierce
"Diplomacy is the art of saying 'Nice doggie'
until you can find a stick."
You may see that your neighbor has more forces than you at the moment and is uncomfortably close to your border. You have no plans to help them, but it may be advantageous to form a tenuous alliance for the moment. You may use the situation to convince your "ally" to let you move your forces into his space under the pretense of helping him. When he least expects it, you suddenly turn traitor and attack him in the heart of his empire, seriously cripping him.
"The enemy of my enemy is my friend"
I have been in the situation where after an attack on an enemy (and mostly losing), i realize that my forces have no hope of surviving. You'd be surprised how far an offer of "ok, you win, but if you don't destroy me now i'll go annoy your enemy for a while". You may have just found yourself a new ally. Then again, you may follow the route of "Diplomacy", as quoted above. :-)
Survival
Often you'll find yourself in a situation where you form a temporary alliance with somebody to assure your short-term survival, as described above.
Mutual Benefit
A popular reason for allying is because you can honestly improve your position in the game with the help of another, and vice versa. Common reasons to Ally:
One of the most fun paths of destruction i left was when i was playing the Federation and was Allied with the Privateers. The Privateers would tow on of my heavy fighting ships over great distances (>81 LY) from planet to planet. All the Privateers did was tow, and I would fight the ships and planets and destroy them all. Each turn i'd beam up the minerals and money to make more torpedos, and beam all excess fuel over to the Privateer ship. The attacks were senseless and random. We just wanted to smash stuff. Don't always assume there's a big plan behind every attack. :-)
Formal Alliance
The game provides functionality to formally ally yourself with another race. The alliance is invisible to the rest of the players (but isn't too hard to figure out if you're watching closely). It allows you to navigate their minefields as if they were your own (you don't hit them, the "mine sweep" mission doesn't destroy them, and your mines don't destroy theirs) and your ships will not attack theirs (and vice versa).
To offer an alliance with another race, set the friendly code of at least one of your ships to ffX, where X is the number of the race to which you are extending the offer. (eg. Feds = 1, Birds = 3, Robots = 9, Rebels = a) To accept the alliance, the other race must do the same thing for you. If you both do it simultaneously, you will both be allied in the next turn.
To end the formal alliance, set the friendly code of at least one of your ships to eeX, where X is the number of the race with which you are ending the alliance. The alliance will be terminated for the next turn.
Informal Alliance
An informal alliance isn't much more than a non-agression
treaty. You may be helping each other, but you may still fight each
other, even by accident. You can provide your enemy with friendly
codes to your minefields (local friendly code or universal friendly code)
so that they won't hit your mines. Knowing the minefield friendly
code does not prevent you from sweeping your ally's mines (as far as i
know).