By restarting your device, you will kill all the processes running in the background as well as the one which might have prevented you from connecting to Wi-Fi network(s). Also, you will reset the Wi-Fi card (or adapter), which might have failed to load properly.
"Forget" the Wi−Fi network and reconnect again to it
Consider "forgetting" the Wi-Fi network, especially if you reset your router and entered the same wireless network name (and password), but, before that, you were able to connect to that Wi-Fi network.
To "forget" the network, follow the below-mentioned steps:
Go to Settings, select Wi-Fi and enable it by moving the slider to the right.
Tap on the Wi-Fi network you want to "forget" and select Forget This Network.
You won't be able to connect to Wi-Fi, if you don't enter the correct password. Make sure that the password is entered in a correct way, as passwords are case-sensitive (e.g water is not the same as WateR).
"Forget" the Wi−Fi network and reconnect to it again
Consider this as an option, especially if you reset your router and entered the same wireless network name (and password), but, before that, you were able to connect to that Wi-Fi network. You need to remove the Wi-Fi network from your mobile device's saved Wi-Fi passwords list, i.e. "forget" the network, and reconnect to it.
To "forget" the network, follow the steps below:
Go to Settings and tap on Wi-Fi;
Tap on the Wi-Fi network you want to forget and tap on Forget.
After you have "forgotten" the network, reconnect to it.
Your device's inability to connect to Wi-Fi networks might be due to a hardware-related issue, usually with the device's Wi-Fi module. In this case, consider taking your device to a repair shop, only if you have tried all the other solutions, including resetting your device to its factory settings, but none of them worked.