For 3g to work, it needs an APN.
On the old iPhone 3, the APN can be set under the Settings / Cellular Data tab and on the iPad it is under Settings / Mobile Data.
However, on the iPhone 4 this tab is no longer available (for reasons I have been unable to fathom) and it is thus a bit harder for the user to reset.
I would first try resetting your Network Connection to see if that cures the problem = Settings / General / Reset / Reset Network Settings.
When the phone boots up it should find your network from the information stored on your SIM card.
If 3g is still missing, one way around the problem is to download a copy of the "iPhone Configuration Utility" and create a new "Configuration Profile". You'll need to connect your iPhone to your Mac via its USB cable.
Run the Configuration Utility and in the left window pane, click on Configuration profiles.
Then click on the Icon with the + symbol in the top left corner to make a new one.
Give the profile a name and scroll down to the bottom option "APN" in the right pane.
Enter the APN setting for your carrier, you can get this from your carrier, their website sometimes or google it.
Then click on "install" to send it to your iPhone. You will also need to accept it on the iPhone (follow the prompts).
That worked for me.
PS: lots of Apps on the iPhone use location services for ads (in many free games), updating info (weather & stocks etc) and tracking. If your 3g is not working, these will keep trying to connect and probably run your battery down pretty quickly. Try turning Location Services off to see if battery life improves.