What kinds of laws apply when Gentile nations fight each other?
Should Noahides support certain types of wars and oppose others? Or is war always forbidden?
> What kinds of laws apply when Gentile nations fight each other?
You can find a review of this subject by Rabbi J. David Bleich, in "Contemporary Halachic Problems," Volume 3. Nations have attempted to regulate warfare, but its elimination remains a Messianic ideal. Renunciation of chemical and biological warfare, humane treatment for prisoners, etc., are certainly marks of "civilized" peoples, but "civilized warfare" is a self-contradiction.
> Should Bnei Noach support certain types of wars and oppose others? Or is war always forbidden?
Although the Noahide Code prohibits murder and harming, all persons have a right to eliminate an aggressor in self-defense, so a defensive war requires no further justification. The Minkhat Hinnukh concludes that Gentiles are justified not only in self-defense, but may also eliminate a threat to the lives of others as well, even though they are under no Torah obligation to do so. The "law of the pursuer" is certainly also applicable when an entire community or nation is being pursued. Thus, military action is justifiable either in self-defense or on behalf of a victim of aggression.
But the Talmud declares that Gentiles do not have rights of conquest (which is theft). The Talmud does however affirm that Gentiles may acquire title to lands captured in wars of conquest, even though they have no right to engage in war this purpose.
In the Book of Obadiah, the prophet chastizes Edom for standing by silently while the Babylonians slaughtered great numbers of Jews during their campaign of destruction. This implies that Gentiles have an obligation to do battle against those who attack the country of Israel, or Jews anywhere.
In general the answer is yes. However, it can depend on the nature of the country's government and its military activities. Just for example, governments are forbidden to engage in genocide or piracy, so it would be wrong to volunteer to join in military efforts of that nature.
It could not be claimed that a government decided to engage in genocide or piracy for a good purpose, to legitimately help or protect others.
It is the beginning of the fulfillment of a Biblical prophecy that some nations now use their military resources for altruistically helping people in need, as it says in Isaiah about the immanent Messianic Era, "The will beat their swords into plowshares."
Military violence can be justified if a country is under attack and the people need to fight for themselves in self-defense.