The Android operating system stores text messages in the phone's memory, so if they're deleted, there's no way to retrieve them. You can, however, install a text message backup application from the Android market that allows you to restore any deleted text messages. The backup app will make a copy of the text message files stored on your phone and place the copy on the secure digital card so that it won't be affected by the text app. Then, if you lose an important text or transfer phones, you can retrieve all of your text messages.
So get a backup app for future text messages.