If you are running into issues connecting to a network you used to be able to connect too or for unknown reasons, fire up the terminal and run the following command.
networksetup -setairportpower en0 on /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport scan networksetup -setairportnetwork en0 WIFI_SSID_I_WANT_TO_JOIN WIFI_PASSWORD