Murray Rothbard wrote that there were only 2 just wars in American history. They were "the American Revolution, and the War for Southern Independence." Of course, when he wrote the War for Southern Independence, he was referring to what is called the Civil War. But he was correct that the Civil War is an inappropriate name, because it was not two factions fighting for control over the government or for power. The southern states simply wanted to secede and be left alone.
Most Americans think that World War II was just, at least on the American side. But they ignore (probably because they don't know or don't think about it) a lot of facts about the war. They ignore that Japan was provoked into attacking through actions such as oil embargoes. They ignore that Roosevelt likely knew that an attack on Pearl Harbor was going to happen but did not tell anyone so that he would have an excuse to enter the war. They ignore that the American government teamed up with Stalin, who likely murdered far more people than Hitler. They ignore that Hitler likely never would have come into power if the American government had not entered the first world war and imposed harsh reparations on the Germans. They ignore that millions of innocent Jews were slaughtered, despite American involvement. They ignore that innocent people were sent back to Stalin's Russia after the war, only to be murdered. They ignore that dropping atomic bombs on Japan was completely unnecessary in "winning" the war. There are a lot more interesting details that are unknown to the vast majority of the American people.
On the American Revolution, it was obviously just for the American colonists to secede. It is debatable whether more could have been done to avoid violence and outright war. It can also be pointed out that some of the "Founders" who are thought of as great men perhaps had more than good intentions in supporting independence from the British. But overall, there is no question that the American side was in the right and the British side was in the wrong. War is not usually black and white. It is not like the movies, or even history classes, where one side is good and one side is evil. But with the American Revolution, one side definitely had a far more just cause than the other.
For the so-called Civil War, things get even more cloudy. There is no question that the southern states were less at fault than Lincoln and his cronies. Lincoln turned into something of a brutal dictator. His main stated purpose of the war was to preserve the union. It was not to free slaves. Lincoln had a quest for power. You can read Thomas DiLorenzo's book The Real Lincoln for a good history of the brutality of Lincoln. It is completely ridiculous and evil that someone would start a war, which ultimately killed far more than half a million people, even if his intentions were to free slaves (which is not the case). If he really had cared about slavery, he would have eliminated the federal Fugitive Slave Laws. It would have made it difficult for the southern states to hold onto slaves and keep them from escaping. There were other ways to undermine slavery without resorting to violence.
With that said, both sides were really evil on this. The southern states, while also unhappy with tariffs and other things, did use slavery as one of the principle reasons for seceding. In addition, even aside from the issue of slavery, the south was far from some libertarian paradise. They had their own taxation, their own funny money, their own draconian laws, and forced people off to war. On top of that, the morons stood in a line in an open field and fought battles. They did not learn from their American ancestors to fight a guerrilla style war. They seemed to care more about "honor" than about actual freedom. And they sure didn't care about freedom for slaves.
In most wars, it takes two to tango, or perhaps we should say tangle. There is usually evil on both sides. The American Revolution is a rare war where one side was clearly more justified than the other. The so-called Civil War is not as clear, although the southern states should have been allowed to secede peacefully. While the southern states were evil, Lincoln and his army were far more evil. I can't think of any other wars in American history where American fighting and involvement was justified.