Unfortunately this happened to one of us at the iPhone Surgery, and prompted us to take a look at the iPhone tracking and theft prevention apps. Luckily our iPhone was returned by a kind member of the public, but obviously not everyone is this lucky.
The first and obvious choice is Find My iPhone, from Apple. This is free and can be downloaded and set up quickly and easily (it requires an iCloud account). Although not foolproof it does have some helpful features such as remote wipe which will clear your data if you believe your iPhone has been stolen. If your iPhone is off or out of battery when you lose it, you can set up Find My iPhone to send you an e-mail if it is turned on.
However, if you're iPhone is stolen, the thief will likely know these things and not even turn your iPhone on. Which means the GPS on the iPhone will not be able to track it for you. Here are a number of alternatives which may be of interest: iHound, GadgetTrak, Undercover to name a few.
The other course of action to take which would be advisable is to register your iphone with www.immobilise.com which is supported by various police forces. If you do have your iPhone stolen and you cannot recover it, this is the best way of ensuring someone else will not be able to use it, and there is a real chance that whoever did steal your iPhone may be caught whilst trying to sell it.
Whatever you decide to do, don't wait until you have already lost your iPhone before taking action!