There are two connections, your phone to your router, and your router to the internet. Your phone can connect to your router without connecting
through the router to the internet. Start with
Troubleshooting Wi-Fi Connection Problems and see if any of those things fixes the problem.
If not, create a free account on Android Central
here and post again in this same thread and we can go further. (This is assuming that other devices on your router connect to the internet
and that you can connect using mobile data. If you can't connect with mobile data, the phone or the app may have a problem.)