It may be dependent on a couple of factors. Check if your internet connection is active and working (try opening Safari and surfing the net). If internet is working fine, and the signal is strong, it may also be dependent on you Apple ID settings: check if the double step verification is active for your account (the system may need to verify your identity before letting you access your account on a Device). It may also be server dependent (a temporary "un-reachable server").