I'd like to add that the same happened to me (with MBA 2011, 13", 10.7.2) when I switch from work to home: at home, the MBA can't automatically connect to my own —preferred— network, because there is another more "powerful" that is shown first in the list of networks. (Although this is randomly…)
–
F_Jofre_AMay 7 '12 at 3:35

2 Answers
2

Mac OS X should automatically join any known networks, as reported in the network applet.
After you select the Airport service in the list of the network connection, you can click on the Advanced button, which will show a dialog that allows you to select your preferred networks, and to sort them.

The Mac will not automatically connect if it doesn't find any of the preferred networks, or if the preferred network requires a "password" that is unknown to the Mac.

Sorry, I should have added that the network is in preferred networks and that the password should be correct as it was auto-entered (I opened up the screen above, then added a new network by selecting a network I was already connected to)
–
CasebashFeb 23 '11 at 10:52

If there are more networks available, it is possible the Mac doesn't understand to which you want to connect (even though it should follow the priorities given in the preferred networks). Verify the password is the correct one; if you entered one already, remove the network from the list of the preferred networks, and try again to connect. Also, verify the router is not blocking the computer basing on its MAC/IP.
–
kiamlalunoFeb 24 '11 at 5:04

In the Wi-Fi preferences, go into the advanced tab and drag your home Wi-Fi network to the top of the list. Remember to lock your settings once you are done.
This should auto-connect once you switch on your AirPort.