iPhone 3G w/o SIM messaging app
Your iPhone 3G isn't eligible to upgrade to iOS 5+ which use iMessage, as a supplementary (or primary) means of messaging, and which does not require use of SMS (cellular transfer). 

As a result, you will need to rely on a 3rd party app (that supports iOS 4) to do your messaging. A Google search revealed that there are still a number of texting apps that support iOS 4.3 (which your phone should support) such as:  https://itunes.apple.com/us/app/textplus-free-text-group-texting/id314487667?mt=8&amp;ign-mpt=uo%3D4