Two researchers, Pete Warden and Alasdair Allan, have found that Apple iPhones store data on their users' locations which they store in a folder, both on their phone and on their computer when they sync with iTunes. Warden says that at first they didn't realize how much data was actually being stored, but when they discovered, it turned out to be a scary amount.
Your iPhone is keeping track of you
The data is stored in a file called “consolidation.db” and it contains longitude and latitude information along with timestamps. Apple has been recording this data since iOS 4.0 came out, it seems. The researchers believe that the data is collected from information from cell phone tower triangulations. It isn't very exact but it gives a good reference to where your cell phone has been over time. Warden and Allan have created an app that creates a visualization of the users' information on the iPhone 3G or the iPad.
They maintain right now that only the user has access to their location information. If someone else wants to access the information, they'd have to physically have the phone or computer with data backups. It seems to be a security feature you could use to track your phone but if someone already has your phone and they've run away, there's no information you can gather about where they've gone. So what is the point. We'll have to wait for Apple's answer on this one.