Not guaranteed, but maybe this'll help:
You could also try these if the above link doesn't help: Wifi problems seem to crop up a lot on here and unfortunately there doesn't seem to be a 'one fix' solution.
However, sometimes any one of the following can help although, unfortunately, not always - in no particular order:
- Check wifi security - if it's WEP change it to WPA or WPA2 (preferably, as it's more secure)
- Change the wifi channel on the router
- Create a new Network Location: http://support.apple.com/kb/HT5289
- Reboot the router
I had the same problem for months. Went through Apple support, paid for service and still they couldn't give me the solution that worked. I found out for myself that the only fix was to use an external wireless adapter, ethernet or usb will do. Since I connected to my router through the external adapter I have not had the problem again. It is a permanent, although external fix.
Hope this helps you shortcut months of frustration.