For starters, an iPhone may be unable to connect to WiFi due to a small firmware problem. That's why you'll need to do a simple Forced Restart to refresh the device's memory and reload all of its apps and services. If the issue is caused by a minor firmware flaw, your iPhone should now be able to connect to the WiFi network.
you can also reset the network setting
- Open the Settings application.
- Select General.
- Restart by pressing the Reset button.
- Reset the network settings by pressing the Reset Network Settings button.
- Enter your passcode if prompted.
- Reset the network settings by pressing the Reset Network Settings button.