Why doesn't my MacBook Pro automatically reconnect to the Wi-Fi when resuming from sleep? I have a 2012 MacBook Pro with Retina display (currently running Mountain Lion v10.8.2).

Every time I wake it up from sleep (open the lid), it doesn't seem to automatically re-connect to the Wi-Fi network. If I manually click on the connect button, it works fine. I'm fairly sure this used to work.

How can I fix this?
It should automatically reconnect but it might take a couple of seconds, more depending on the speed of your wireless router.  How long are you waiting?

It will automatically join a network if you have configured it to remember networks you have previously joined.  You can check this in the System Preferences>Network page. Click on the WiFi entry then on the Advanced button.  In the Wi-Fi tab is a list of Preferred Networks.  Make sure your network is listed, with the correct security mode.  If it is listed but not at the top, perhaps the laptop is trying other networks first.  Move your preferred network to the top of the list.

If that still doesn't work, try deleting it from the list, click OK, click Apply.  Then turn off the Wifi by clicking the "Turn WiFi off" button above.  Then turn it back on and choose your network, making sure that it is set to remember.  Save/Apply and close the System Preferences and try sleeping again.