OoT's ending was somewhat sad, but ended on a positive note. Bit like
The Fox and the Hound.
I think
OoT had the best storyline jointly with
MM,
LA a close second purely because of its masterful execution.
ALttP had a great backstory that essentially made the legend, and a good yet somewhat lifeless seeming story itself. The backstory of the Oracles was less rich, but their own story was very good, so I'd put them joint third.
After that I'd put
TMC (it loses a lot of points for its formulaic nature and its ridiculous overuse of other games' characters) alongside
TWW, which, whilst generally pretty sucky had some decent backstory and a few very redeeming scenes with Ganondorf. tAoL follows these two closely.
A lot further down comes Four Swords, slightly ahead of Hyrulean Adventure because HA owed a lot to it and messed Ganon up royally, which is joint with AST.
Lastly comes the compartively really unoriginal and dismal
tLoZ.