Apple just released an update for all iMacs, Late 2009 or newer. It requires OS X Lion 10.7.3.
About iMac Wi-Fi Update v1.0
This update resolves an issue that may cause an iMac to not automatically connect to a known Wi-Fi network after waking from sleep.
It is recommended for all iMac (Late 2009 or newer) users running 10.7.3.
Weighing in at 25.81MB, the update can be downloaded from Apple’s software update page.