The Fire Nation lost the Hundred Year War due to a number of factors. For one, many of their best leaders and strategists were defeated in the last few months, such as Admiral Zhao. This led to many troops being leaderless, making them more vulnerable. Also, the formation of the Invasion force executed a threefold attack on the Fire Nation, all of which were successful and ultimately caused the Fire Nation to admit defeat.
One of the attacks was the battle with Azula, the soon to be reigned Fire Lady. Her unstable mental state and mixed emotions caused her defeat, and thus the Fire Nation Capital fell under the control of Zuko and Katara. The second attack was the liberation of Ba Sing Se commenced by the Order of the White Lotus. The successful invasion lost the Fire Nation one of its most glorious colonies and reinstated the freedom of the Earth Kingdom. The last stage is the disablement of the airships and the defeat of Phoenix King Ozai. With the capital controlled, the main colony liberated and the leaders defeated, the Fire Nation lost.