Whenever I go to a midnight showing I buy my tickets online (fandango or the theater chain's website.... like for a muvico theater).... I do this to ENSURE my seat for the movie (you wouldn't want to show up and find out the movie is sold out). Or you could pre-buy your ticket, but that means being at the theater in person on a previous date and remembering to buy your tickets in advance while you are there....
What time to be there? It all depends. Is it a big theater, usually a hot spot for people? I went to the Thursday pre-showing of Iron Man, at 9pm, at a Regal Cinemas (largest theater chain in USA) and I live in South Florida.... and there were only 12 people in the theater.
But then again... I have also gone to midnight showings for Harry Potter and the Goblet of Fire and Harry Potter and the Order of the Pheonix and those theaters WERE PACKED PACKED PACKED WITH PEOPLE and I absolutely had to show up an hour early to get decent seats....
I would say arrive at least 11pm (an hour early), with tickets pre-paid.
10:30pm if you are REALLY paranoid.
When I see TDK I will probably go to the theater around 10:30pm.
Greg