Usually, iTunes will automatically backup your iPhone when you sync with iTunes. If you have the backup, then the SMS recovery will be easily:
Here are the steps:
Click the "File" menu and select "Devices" > "Restore from Back up".
Or
Open the iOS device's "Summary" tab. There are two ways to access this:
Click the device button in the upper right corner. (If viewing the iTunes Store, click the Library button in the upper right corner. The device button will then be visible.)
From any view in iTunes, click the "View" menu and select "Show Sidebar". Select your iOS device in iTunes under "Devices:.
Click the "Restore Backup" button.
For more details, see:
how to recover deleted text messages from iPhone
If you haven't had a time to back up before the deletion, or you just don't want to restore the whole iPhone with the backup file, here are the solutions:
how to recover deleted photos on iPhone
how to recover deleted contacts on iPhone
In this step-by-step guide, 3 methods to retrieve data on iPhone are introduced, including:
Recover directly from iPhone;
Recover under iPhone DFU mode;
Extract from iTunes backup