Tolkien's Legolas is a lighthearted singer seldom daunted by anything, with long poetic speeches (like most of the characters) and almost no character development at all. Jackson seems to want to give characters more depth by having them grow and change as a result of their adventures.
Legolas has few lines, especially in the first movie, yet he's got quite a path to walk.
Two "facts" were introduced to Legolas' background by the movie's developers: they invented an age for him, and they decided he'd never seen anyone die. He's probably even younger, but their figure of 2931 still makes Legolas too young to remember the massacre of most of his people and his own family in the Last Alliance. Mirkwood's elves have seldom left their forest since. Considering how traumatized Legolas' father was by that event (see UT for details), I could well believe Thranduil sheltered him, perhaps even leaving him home to run Mirkwood during the Battle of the Five Armies.
Whether you read between the lines in Tolkien or accept the movie's assumptions, Legolas is fairly innocent when it comes to mortality. He's obviously a skilled hunter (he'd have to be: Mirkwood's a rough place), but he's seen little (by the book) or no (by the movie) deaths of Men or Elves.
Remember also that, in Tolkien's scheme, Elves' souls return to Aman when they die. So while they're lost from Middle Earth, unless they make Lúthien's choice, they're not really gone. Men, however, "pass beyond the confines of the world", so to Elves they are doubly bewildering: Men age, and Men disappear after they die, irrevocably.
The first to fall...
When Gandalf falls, Legolas gets his first taste of loss. Until then, he'd been doing a decent job of saving people's butts from giant squid, troll hammers, and the odd precipice.
When Aragorn's trying to get the party moving, he calls to Legolas to rouse them, expecting the elf to take Gandalf's death in stride. But watch closely while Merry and Pippin are crying. You can see Legolas' feet, and he's moving like a sleepwalker. As for his face, he's definitely showing pain, but he's also utterly bewildered. Where did Gandalf go? What do you mean, gone? He looks like he can't wrap his head around it.
In Lórien, Legolas can't translate the lament for Gandalf, because "the grief is still too near". He can't process what's happened. In the Extended Edition, when Celeborn asks after Gandalf, Legolas can only stammer that he saw a Balrog and that Gandalf led them needlessly into Moria. Legolas doesn't and can't elaborate on Galadriel's vague, "he has fallen into shadow".
A very human death...
Fast forward to the movie's end. Legolas comes back to Aragorn and Boromir just in time for his sharp elven eyes to witness, up close and personal, a man facing his own death, another man helping him through it, and the exact instant when the human soul leaves the body for the great unknown. Again, the elf slows to a standstill, and his expression is very peculiar: head tilted to one side, he's trying to grasp what he's seeing. He looks crestfallen-- for the loss of a comrade, and for coming too late-- but he still can't quite work out what to think of it.
We've failed them...
Enter TTT. The Three Hunters have had several days of running to contemplate whether "they may still be alive". They are still caught offguard by Éomer's news. Watch carefully when it hits Legolas. He's stunned, but this time, I don't see that "wha?" look in his eyes. Instead, he reaches for Aragorn. There's a moment when the elf has his arm around the Ranger's back. Having witnessed a friend's death firsthand now, Legolas is starting to feel loss very personally.
But he's no longer speechless. When they reach the pyre, Legolas whispers, Hiro hyn hîdh... ab 'wanath. (May they find peace... after death.) He makes the same formal elven gesture of farewell that he and Aragorn did when leaving Rivendell (EE version).
But sometimes death isn't what it seems...
Before the grief has time to settle, Aragorn realizes the hobbits have escaped. Then Gandalf shows up against all odds. There's a nice detail in that sequence. Nobody except Cirdan, and probably Elrond and Galadriel, knew what Gandalf really was. But Legolas, the boy from the backwoods, apparently figures it out quickly: he kneels as if to a Valar or Maiar. Gimli follows suit.
This wasn't supposed to happen...
Those of us who know Tolkien were as shocked as the newbies when Aragorn "took a little tumble off the cliff"!
Legolas isn't frozen or confused for an instant when he hears those words. He's simply furious: "You LIE." If the orc hadn't died, I think Legolas would've ripped his throat out the way he had the scout. The elf understands immediately that he's facing another friend's death-- he just doesn't want it to be true. Then Legolas sees and takes the Evenstar. He runs to the cliff. His keen eyes can't find the one thing he wants to see. He shows another flash of anger when Théoden says "leave the dead". Legolas is hearing "dead" as "Aragorn". He grasps the concept all too well now.
We last see him standing over the cliff looking down and mourning, in a very human way, and contemplating the irony of the jewel he holds: the symbol of elven immortality, all that's left of his mortal friend.
What should be, will be...
Behind the teasing, Legolas' first gesture is to put things back where they belong: the Evenstar in his friend's hands, nevermind how grubby Aragorn looks. The exchange between them is charming but poignant. For the elf, also, something vitally important in his life has been put back into its proper place.
Death take us all...
Small wonder that Legolas loses his cool shortly afterwards, when he realizes that a massacre at Helm's Deep is inevitable. When Aragorn says, "then I will die as one of them!" it has to bite hard: Legolas just got him back from death.
Taking hope from the survival of the hobbits, Gandalf, and especially the luck of Aragorn, Legolas quickly rallies and defies the looming threat of mortality. "I was wrong to despair." Legolas takes no chances, however. When Aragorn takes another tumble off the Deeping Wall, and Gimli jumps down into a flood of orcs, Legolas shows off his wildest archery stunt getting down to them. He hauls Gimli away when the retreat's called. And he's got a rope ready at hand to pull his friends to safety.
No one lives forever...
There's one moment of revelation we don't witness, Legolas' reaction to the deaths of so many of his own people. Haldir's eerie death scene hammers home the point: they could have lived forever, but they died for men. We see Aragorn's sad farewell. But there's no reaction from anyone else. (There had better be... so drastic an alteration to the story should have some sort of meaningful resolution).
I am not what I was...
(Spoilers to end of ROTK)
We know that Frodo never really gets over his wounds, but there's a hint that Legolas never gets over his adventures either. He was raised as a Wood-elf (again, see UT), a lighthearted soul in a very isolated community. If my speculation is right, that Thranduil had attempted to shelter his son against the sorrows of the elves, then Thranduil lost the battle.
Legolas can't go back to being a simple Wood-elf, running under his beeches and taking no notice of the affairs of the world. He's seen too much. Instead, he settles in the forests of Gondor, a kingdom of mortal men. If you read Tolkien's original ending for the tale, which friends talked him into chopping out shortly before publication, you find that Legolas also spent a lot of time living among men in Minas Tirith, or travelling with Gimli and taking both dwarves and elves to mingle freely among humankind. I amar prestar aen, the world has changed.
And to him I will hold...
Legolas spends his last century in Middle Earth with his heart divided. He loves Middle Earth, but the sea calls. However, Aragorn is apparently more important to him than either one. The greatest decision in Legolas' life, to leave behind his Silvan heritage and sail to Valinor, is dictated and predicated by the death of Elessar, his friend, a mortal man.
I have a feeling Legolas' father wished he'd sent a different messenger to the Council of Elrond.
But when Legolas leaves Middle Earth, that chapter in his life closes. We can't be sure whether Frodo, Sam, Bilbo, and Gimli were granted immortality, or only a place to live out the rest of their lives. Either way, Legolas will not have to cope with death and mortality much longer. That profound lesson will soon be a memory.