The only time Avatar: The Last Airbender ever portrayed anything as black and white was when Commander Zhao killed the Moon Spirit, and the entire world literally lost its color. For a Nickelodeon show, Avatar dealt with mature themes that most action-adventures of its time would never address. Balance was a major theme, considering the Avatar's job is to bring balance to the world.
Balance in Avatar: The Last Airbender is the idea is that nothing is black and white, and the world is better off with shades of gray. Nothing and no one is exclusively one thing or the other; the Fire Nation isn't completely evil, and the Earth Kingdom isn't quite the beacon of hope it's made out to be. And, no matter their allegiance or role in the story, no character is two-dimensional -- except maybe Cabbage Man.
Fire Lord Ozai Is Only Mostly Evil
Ozai is a generic villain in some ways, in that he's evil simply because he's evil, without much explanation as to why. However, he isn't as much of a tyrant toward his own people as one might expect from someone with aspirations of world domination. He rewards his subordinates for their hard work and heeds the advice of others (even his children, on occasion). Although the Fire Lord isn't the most redeemable character in the series, Avatar does well to include minor details to indicate that Ozai isn't solely a monster; it's only his most notable character trait.
Despite his depiction as the manifestation of evil, Fire Lord Ozai wasn't just a power-hungry madman. After all, the Fire Nation is a prosperous, industrious society under his leadership. Looking past the morally reprehensible ways this prosperity was achieved, it's the only credit Ozai deserves that he shares the spoils of war with his people. Ozai rules the Fire Nation for his own ego, but also the benefit of its citizens, which is more than even the Earth Kingdom can say.
The Dai Li Fight for Peace in Their Own Way
Ba Sing Se was long been a symbol of hope as the only place in Avatar's world that repelled the Fire Nation's invasion. When the Gaang reaches the Earth Kingdom capital in Season 2, it quickly becomes clear that Long Feng, leader of the secret police, the Dai Li, wields the power, not the Earth King. However, the Dai Li's sole motivation is the preservation of Ba Sing Se's reputation as the greatest city in the world, and they will do whatever it takes to maintain the peace inside the walls.
The Dai Li use sneaky, underhanded tactics, including actual brainwashing, but they don't do it to grab power; they just want to maintain the peace. The citizens are kept unaware of the war outside the walls, lest they find out how much of the world is under Fire Nation occupation and start a mass panic. Granted, the Dai Li agents later reveal their allegiance is less to the Earth Kingdom and more to whoever they decide to serve, but moral ambiguity is a crucial element of the series.
The White Lotus Represents the Ideal World of Avatar
Of the five key members of the Order of the White Lotus -- a once-secret society devoted sharing ancient knowledge -- Iroh, Piandao and Jeong Jeong were once members of the Fire Nation military. The White Lotus demonstrates that people from all walks of life can work together, and a person's allegiance is up to them, and not something owed to a nation. While Fire Lord Ozai exploits Sozin's Comet to decimate Earth Kingdom territory, Iroh uses it to free Ba Sing Se from the Fire Nation in the perfect example that balance is brought about by people, not the elements they bend.
No one is entirely good or entirely evil in Avatar: The Last Airbender; even Azula is just a child lashing out because she thinks her mother hates her. Pakku might have been a sexist, but he was trying to abide by his long-held traditions, and was open to change when he saw how it affected others. Zuko was so obsessed that he burned down Suki's village and grew to be compassionate enough to apologize for his actions. From heroes like Aang and Katara to villains like Ozai and the Dai Li, Avatar treats all its characters like they are real people, with more to them than meets the eye.