Some things that have caused connection problems with WiFi /Internet, may or may not apply in your case
Run through them and see if any of them work.
First, check the time and date are correct in your System Preferences and that it's being updated with Apple's time servers.
Second
Check with Airport Utility that there is a update that needs to be applied to the Airport's firmware.
Also run your Software Update for OS X too.
Third
If you have a "hidden network" it doesn't broadcast a SSID, the Mac will only ask if it's there upon a reboot or manual connection. Not upon a wake up from sleep or if it gets out of range of the Wifi.
To stop this you need to unhide your network, hidden networks and MAC address filtering offer no protection against hackers.
Fourth
Read my guide here to secure your WIFI
WiFi security issues, at home and WiFi hotspots
Fifth
Newer Mac's are not connecting to WEP encrypted as it's basically worthless, WEP and WPA are both cracked.
Only WPA2(AES) is secure, you can read about that in my User tip link above.
Sixth
Some ISP's are testing IPv6 and may cause issues, turn it off in your System Preferences > Network > Advanced > TCP / IP
Cheat sheet to help diagnose and fix your Mac