First you need to check your Wi-Fi Router: check if other devices can be connected. This will let you know whether there is a problem with your Wi-Fi router. You can restart your router and try to connect to WiFi again.
Make Sure Wi-Fi on And You can See Your Network
Go to Settings on your iPhone > Wi-Fi, and check if it is on. And if there is a blue checkmark beside a network name means your iPhone or iPad has been connected to this network.
Restart Your iPhone/iPad, Router, Cable/DSL mode
If that doesn't help, reset Your Network
On your iPhone iPad, got to Settings > General > Reset > Reset Network Settings. This will reset Wi-Fi networks and passwords, cellular settings, and VPN and APN settings that you have used before.
These steps should help.