This is what solved my problems with WiFi disconnecting randomly, not appearing after awakening, etc.
1. Open network preferences from your WiFi icon in the menu bar. Then click advanced. Delete the network that is giving you problems.
2. Open Keychain in the utilities folder of your hard drive. Find the passwords that are stored for your particular network and delete them. There may be multiple passwords for your network, so search carefully.
3. Repair permissions using the disk utility.
4. Reboot the computer.
5. Reenter your network data to log into the network.