First off, did you reactivate the phone after the factory reset? Dial *228, option 1 and follow the prompts?
Do you have a 3G symbol next to the signal bars? Or are you attempting to connect through a wifi network?
Go to Settings > Wireless & Networks > Mobile Network settings. Verify the mobile network is checked on.
For wifi, go to settings > wireless & networks > wifi settings > turn it on > press menu button > scan for networks > select the wifi network you want to connect to > enter the password if required and select the connect button