To hide SMS preview can be really very important feature some times, if you don’t want other to read your messages when some one else is using your iPhone, however iPhone by default does not hide the preview of the SMS received but gives you easy to set option to turn on or off the SMS preview.
Before iPhone 3.0 firmware was released the show SMS preview option was used to be under Settings >> General >> Passcode Lock in iPhone but recently after I upgraded my iphone 3g to 3.0 OS I came to know that this option of show SMS preview has been moved under Settings >> Messages
In iPhone with Firmware Less Than 3.0 i.e 2.0 .2.2 or 2.2.1 iphone firmware
In iPhone with Firmware 3.0 or Newer Firmware
So in order to hide SMS preview on your iphone with 3.0 firmware installed go to Settings >> Messages and toggle Show Preview