I'm flying to Israel next month and I've booked a flight with a 24hr layover in London... which leaves me a very narrow time window to explore the city!
So, what would you do if you had 24 hours to spend in London? (well, I guess it's probably more like 20 with traveling to and from the airport, plus going through all of the lines).
I highly recommend climbing to the top of St. Paul's Cathedral!! It's 528 steps but so WORTH the view. Tower Bridge, Globe Theater, and the Tower of London are all close to St. Paul's so you could easily walk to those four spots. The Sherlock Holmes Pub is also in the area for a bite. Otherwise you could easily do a bus tour and see the main sights.
Further to the above, I'd suggest Borough market for excellent food.
It does entirely depend on what you like to do, and when you are going to be there. But if you are interested in the history and classic sights, then the posts above are spot in. The City of London area, with St Paul's, Tower Bridge, Tower of London, is an excellent choice, as it is a close together.
Borough Market is also an absolute favourite, especially if you can be there during morning and early afternoon of a Friday or Saturday when there is much more there.