Warning: Spoilers below and in the articles. Although, if you're reading my blog and haven't seen these movies I'm not sure what you're doing.
Times Online article about the best film twists of all time. As a writer who has written a thriller with a twist ending, I know the difficulty of pulling off a genuinely surprising twist. It's not easy.
Had M. Night Shyamalan not done his due diligence throughout the entire script the ending of The Sixth Sense would have felt like a cop out that was tacked on to make the film interesting. Instead, once we know the suprise, we can go back through every scene with Bruce Willis's character and see that all the clues are there.
The twist at the end of Usual Suspects isn't that Verbal Kint is lying the whole time. It's that he's Kaiser Soze. If he was simply lying the audience would have felt cheated. But by making him the very villain the police are trying to catch, putting him right in front of their faces, and showing how far he's willing to go to keep his identity a secret, you create a great suprise for everyone watching the film.
Don't just tack on a twist to make your film interesting. It needs to be organic and work with the story and you need to provide enough clues throughout the film that audience, upon second viewing, will see how it was the clues were right in front of them the entire time.