With the given scenario (two attackers independently attacking the same planet) I would have the attackers fight each other, then the survivor fights the planet. This gives an advantage to whoever owns the planet itself, and mirrors a bit of history - occasionally two independent armies WOULD go for the same fortified place at the same time, and when that happened they would often tear each other to pieces over the "right" to take the planet, weakening themselves past the point of actually being able to take it.
So for any fortified or otherwise conquerable area, that's how I'd do it. If the fight lasts more than one turn, the fortified area fights no one - unless they choose to specifically attack one fleet, maybe?
For three different fleets meeting out in space somewhere (assuming that is possible in your game), you can try to decide on other factors (do fleets have a "speed" attribute of any kind? If so, the two fastest fight first), or have the game try to guess what will give the player the most fun - and what THAT means is entirely up to you. As battles can last more than one turn, you may need to have a system where either defeated fleets "flee" a short distance or multiple hostile fleets can actually occupy the same tile, even if only two can fight each other at a time.