So the film opens with our heroes performing a commando raid against someone I presume were established as villains in the second movie. Wearing full dragon scale armour, riding dragons and generally bumbling about, they easily defeat the trained soldiers who have captured dragons aboard their wooden ships somehow. The captive dragons are freed and taken to our heroes' village, which seems to have undergone a pretty drastic densification, but not expanded much despite there being plenty of room around it. At least the villagers and the dragons coexist peacefully, even as they live practically on top of each other.
One night, a villain appears out of nowhere, apparently so dangerous he can sneak right into the middle of town and out again without anybody noticing. He's there to kill the poster dragon, apparently by way of shooting it with a crossbow ...firing syringe-like bolts, filled with a poison that lets him paralyse the dragon and capture it, so he can... kill it later? If you can get up close and shoot the dragon at point-blank range, with a weapon powerful enough to pierce its skin, why not just get the job over with there and then? Because of this needlessly convoluted approach, the villain fails to kill the poster dragon, but escapes flawlessly anyway. But his appearance scares the heroes so much they decide to abandon their village overnight, packing what little they can carry on their dragons and literally setting off into the sunset in search of a fabled dragon sanctuary at the end of the world. They're leaving behind all their buildings, their boats, the areas they have charted, their nicely tended forest, their fishing grounds (and presumably also fishing gear), in short, everything their society has worked to build over the past few generations. Luckily, they find a very nice island to settle down on when they camp for the first night. Apparently, a better place to live existed only a day's flight away this entire time, can't be more than a couple days by boat at the very most, considering how quickly the villainous fleet appears later. It's an island with lush green forests and waterfalls, and its coasts are all cliffs several hundred meters tall. A little inconvenient for a people mostly living off fishing, but they all fly on dragons so I suppose that's not a problem.
But evil is afoot, and it comes in the form of a gigantic fleet of wooden ships led by the villain. They're coming after the defenseless villagers, who are sat on their precipitous cliffs, only armed with a swarm of fire-breathing, flying dragons... wait, why are these villains a threat again? They're bringing knives to a gunfight here. Or more appropriately, wooden spears to fight the equivalent of a squadron of attack helicopters based inside an impenetrable fortress. The odds couldn't possibly be better for the heroes, there's no way this fleet can be a threat in any form.
So some cunning needs to be deployed. And the villain has exactly the right tool: A female, white poster dragon! It is released near the heroes' village so the poster dragon can fall in love with it, and then ... uhh ... phase two is never really explained, as the villain doesn't have any sort of control of the white dragon. I guess their developing romance is distracting the main hero a little, but it's never shown to be a useful tactic. The villain's plan seems to only consist of capturing the white dragon again to use it as a hostage to capture the poster dragon, but as he has shown enough cunning to capture the poster dragon on his own, I don't see how the white dragon needs to figure into this at all. Oh well, it gives us a funny mating dance scene.
Anyway, the villain appears again, coming in on his mind-controlled-dragon-copter to try to kill the poster dragon once again. Again, he goes for the shoot-it-with-a-paralysing-dart tactic, paralysing the animal he so desires to kill. Oh wait, it turns out that the poster dragon has the power to convince the rest of the dragons to come with him and let themselves be captured, and this is where the hostage tactic seems to come into play. A line earlier in the movie suggests the dragons would obey the villain's dragon if not for the poster dragon, so again I don't see why the villain won't just kill the poster dragon and usurp the position as top dragon instead of forcing it at harpoon-point.
One wingsuit rescue mission later (oh yeah, the heroes have developed wingsuits to go with their snazzy dragon armour, which fits pretty conveniently with the aforementioned cliffs) the dragons are freed, and they promptly burn down the entire villain fleet while the heroes throw out witty one-liners. Judging by the size of those ships, there must be at least a hundred sailors manning each, and the fleet had a hundred ships or more, and everyone was wearing armour... oh man, the heroes are burning and drowning around ten thousand people, and having a jolly good time about it too. Oh well, at least the crab catch in the area will be great for the next couple of fishing seasons.
The main villain gets his comeuppance in the form of good ol' gravity, as per animated movie convention. But his appearance apparently solidifies the idea that the world is not ready for dragons, so they need to go to that aforementioned dragon sanctuary ... which turns out to be a few hours' flight away. There is a mournful scene as the dragons all leave for this place easily reached within a day trip by boat (that's exactly what happens in the epilogue), and the words "you can come visit at any time if you want, it's just a quick trip" seem not to be uttered or thought by anybody. Instead, the villagers now live stranded on their cliff island, without fishing boats or convenient means of getting up or down, while their old, readily developed, conveniently located village still presumably lies only a few days away by boat. It's only been abandoned for a week or so at this point, it's not like going back is impossible. Oh, wait it is: Those cliffs make it impossible to launch boats beyond tiny craft, and the dragons leave forever. The dragons live happily in their sanctuary a few hours away, but never again come to visit the villagers who've learned to depend on them for their ways of life. Apparently, that one day trip in the epilogue (it involves many kids, of course) is the only contact the villagers and dragons ever had again. End of trilogy, exit to the right, remember to recycle your popcorn bucket.