According to Utilitarian ethics, morality and ethical behavior are defined solely by how effective it is in making people happy or in benefiting themin some way. One popular way of summing up the philosophy is whatever does the greatest good for the greatest number of people. In other words, according to this philosophy murder would be an ethical act if, for instance, the person being murdered was about to kill twenty other people. This is why we do not view police officers as mass murderers—killing in the line of duty can be an ethical act.
The usefulness of such an ethical philosophy when dealing with acts of war should be obvious. It is unarguable that war is a horrible thing. It causes death on a large scale, and can wound, make homeless, or otherwise harm many more people than it kills. War disrupts peoples lives, and some philosophies like Egoism might argue that getting involved in foreign wars especially is unethical. By taking a Utilitarian view, though, we can argue that even though war is horrible, it can still be an ethical action, because it may eventually benefit people in a way that not going to war and staying with the current state of affairs in a foreign country would not.
One obvious example that is often questioned in ethical terms is the US-led invasion of Iraq in 2003. This is a sticky question, ethically speaking, because whether or not the war has benefited people depends on who you ask. Before the invasion, the country was ruled by Saddam Hussein, who was executed for crimes against humanity due to his 1982 attack on a village after a failed assassination attempt. It could be argued that, from a utilitarian point of view, the lives of the people of Iraq have been improved by Husseins removal from power. Now that the fighting is mostly over, and peoples lives have improved to almost where they were before, it could be argued that there has been a net gain in happiness and benefit, as the people of Iraq now live in a free, democratic nation where they do not have to deal with a tyrannical ruler.
However, there are some arguments for the opposite view as well. Although the people of Iraq now no longer have to be ruled by Saddam Hussein, and have held several free and fair elections, they now have to worry about suicide bombers and extremists. Many of these attacks are over now, but the nation is still not a safe place to live, and was arguably safer under Husseins regime as long as you were not on his bad side. These problems, coupled with the undeniable suffering that everybody in the country underwent during the actual invasion of Iraq, mean that it is hard to decide whether the war was ethical from a Utilitarian perspective. Although the people now live freer lives, whether or not they are happier than they were before is up for debate. That means that to the Utilitarian philosopher the wars ethical nature is also up for debate still.