I found this thread because I was experiencing the same problem. I tried the fix suggested by BDAqua (as well as suggested fixes from similar threads) and nothing worked for me, but I did figure it out on my own. When I went into the Advanced tab in the network preferences window, I noticed that though my home network was listed first in the preferred networks list, it for some reason showed that my network did not have a security setting even though it was WPA encrypted.
I created a new network by hitting the "+" button just below and on the left side of the list pane and gave it the same exact name as my existing home network. I then set it up properly with WPA encryption enabled and the appropriate password. When I saved it, the computer asked me if I wanted to replace the existing network of the same name and of course I did. Boom, problem solved. The MacBook remains connected at all times now.
Hope this helps those of you future readers that, like me, weren't being helped by any of the existing suggestions.