If you are using iOS 8 , this bug has been persistent for no obvious reason. Though there are several hacks and tips available, the problem can be solved by a simple and quite easier way.
You just need to logout of your Apple account and login again.
If you do not know how to do it, check following steps-
1. Open Settings app, scroll down to iTunes app store.
2. Tap on your Apple ID and select sign out.
3. Re-enter your password and sign in again.
4. You should now be able to to connect to iTunes .
Please remember you need to set date and time automatically. To do this, follow the below mentioned steps-
1. Open Settings app, go to General > Date and Time .
2. Make sure the toggle next to Set Automatically is checked.
3. Now sign in to your iTunes account and check whether it works.
There are several other methods/hacks available which include the following -
1. Make sure your iTunes is updated to the latest version. An outdated iTunes app will not be able to communicate with the servers.
2. Restart your device.
3. Reset your iPhone. Make sure you backed up all your important data. Press and hold Power and Home buttons simultaneously until you see the Apple logo. Your iPhone is now reset. Try connecting to iTunes.
Hope either of these methods have sorted out your problem.
Live....and Let Live!