First, ensure the Wi-Fi network is working. In case there are no problems with the network, normal reset the device and check if it connected back. Even then if the problem persists, factory reset the device and configure the device again. Get the Wi-Fi router closer to the device or add a repeater near to the device.