Cannot join WIFI, previously no problem
You can change the channel of your router, maybe it is the problem with it. 
Another possibility is that a Firewall is preventing this. Go to System Prederences-Privacy and Security and then find the Firewall option. Check if it is turned on or off. Change it to either way and check if you can connect now.
Additionally, you can go to Keychain Access app and try to remove everything related to the router such as its password or ... But be careful and don't remove important passwords. 
You can also use the built in diagnoser, which is in System Preferences- Network-Assist Me. See what it suggests. It usually says that you'd better turn your router off for a minute and turn it on again.
You actually have to play (!) with three files in your System Configuration, which the link below explains how.

This discussion in Apple Discussions is also noteworthy : https://discussions.apple.com/thread/6354581?tstart=0