Many people, including many who love the show, often point out that Energybending is a massive Deux Ex Machina (for those who don't know, Deus Ex Machina means "god from the machine", basically a convenient plot device pulled out of thin air). While energybending certainly fits the definition, I don't find it to be offensive for a few reasons. At least it isn't remarkably timely Eagles coming out of the sky to save everyone at the last second....(and yes, I love LorR).
First of all, the idea of a "World Turtle" imparting some ancient knowledge on the Hero to aid him/her in the quest is a reocurring theme in the genre, so I was not surprised when the Lion Turtle imparted some ancient and long lost knowledge to Aang.
Secondly, I think it is the best of the various options that I can come up with. There are a few alternatives to Energybending that wouldn't seem even more contrived. Certainly, Aang could have killed Ozai outright while in the Avatar state, and it could be implied that it was the Avatar state taking those actions and not Aang himself, but that would feel even more like a cop out.
Another alternative would have been to have Ozai, in his megalomania, to "overreach" while trying to destroy Aang, and cause his own death. This is a commonly used plot device to protect the hero from taking a life directly and instead you can attribute it to the antagonist’s own zeal for killing the hero. While the most probable of the options, this one is also the most common, and I feel would have been kind of cheap. I honestly thought that was how the final battle was going to end since they set it up early on (when Aang is learning fire bending in Book 1 and the consquences of not having enough control are shown).
A final alternative to Energybending would have been to have Ozai actually have a change of heart. This one would have been a horrible ending to the story for many reasons.
What Energybending did was actaully strengthen Aang's character. Here we see that instead of letting the Avatar state take over, Aang finally gains mastery and is now a fully realized Avatar, able to control the state and not let it take over his actions completely. Instead of using all of his power to finish Ozai, Aang actually does something more noble - he puts himself at risk to prevent the taking of life. I think this shows that Aang is truely an uncorruptable spirit, and this is why he was able to defeat Ozai's spirit in their battle of wills in the end.
I think that something that many of us who are older forget is that this is a show made, primarily, for kids. Ironically it has more character depth than 99% of the shows out there for adults, which is part of the reason why it appeals to those of us who are a little older so much. I think the show's creators did a great job with a difficult challenge - how do you have a "pure evil" character that needs to be defeated yet do it in a way that still keeps Aangs principles intact? For me, it's kind of nice to watch a show without a huge body count.