The most likely reason this is happening is that you entered the wrong passcode too many times, but when you try to connect your device you have to enter your passcode which you can't!
Put iPhone in recovery mode (hold down the power button and home button at the same time, once the screen goes black hold down the home button)
Click Restore in iTunes
Wait for your device to finish restoring, but when you are setting it up, you will have to enter your Apple ID and password