There are at least two ways in which to look at this question. First, we can look at the “rights and wrongs” of choosing to go to war. Second, we can look at the “rights and wrongs” of waging war. These are separate issues, but both are very important when we are looking at whether a country is acting correctly with regard to war.
In today’s world, we would typically say that it is only right for a country to go to war if it is defending itself or another country. Therefore, for example, we would say that it was wrong for Iraq to invade Kuwait in 1990 for the sake of taking territory that Iraq felt should have belonged to it. By contrast, we would say that the US and the coalition were right in going to war in order to eject Iraq from Kuwait because this was a form of defending Kuwait.
Of course, there are gray areas here. When the US invaded Iraq in 2003, it claimed that it was doing so to protect itself. However, it is not clear that this would have been justified even if Iraq had been shown to have weapons of mass destruction. It is not always clear where the line between self-defense and aggression is. However, in theory, I would argue that it is right to go to war for defense, but wrong to go to war if the other country is not a direct threat.
We also say that there is a right way and a wrong way to wage war. The right way to wage war is by targeting only members of the enemy military and trying as much as possible to avoid civilian casualties. The right way to wage war is by treating the other side humanely when they are captured. The right way to wage war is by observing international rules and abstaining from things like the use of chemical weapons. In other words, the right way to wage war is by making the process of war as humane as is possible for a process in which you are trying to kill or wound other people. It is wrong to wage war in such a way as to cause unnecessary pain or death.
Thus, we can say that there are right and wrong reasons for going to war and right and wrong ways to behave when one is at war.