Hi ....
Everyone is offering up the the right troubleshooting. FYI, I just wanted to share a similar problem I had with my macbook pro recently, it drove me mad....I was about to take it to Apple, then managed to solve it.
First thing I did was , as above, create a new user - called it test, and then switched user to the 'test' account, I then set up a new wifi location under network preferences, look for my router .. tried to connect - it kept giving me a self assigned IP address. BUT importantly my wifi card could see wifi networks around me.
I then rebooted in safe mode. Restart you mac, hold down the shift key at the sound of the chime. Then see if you can access your wifi in safe mode. I could...which really confused me....
I went through lots of deleting of wifi plist (system) files....after trawling forums...nothing worked, I couldn't connect to the network when logged in normally, only in safe mode.
Drastic measure proved eventually successful. Knowing my Mac could access wifi in safe mode, I rebooted in Recovery Mode - (cmd and R during the restart) AFTER backing up my mac.
Once in recovery mode, I reinstalled the maverick operating system, leaving my files on the mac....once again i still couldn't connect...
I restarted in recovery mode, wiped my mac...and did a complete fresh Maverick install...and then transferred all my files EXCEPT the system files from my backup....
Finally I got back my wifi....
I should point out that Apple Care ran through every option themselves and didn't manage to solve this, it was only after trying every option thrown at me...deleting plist files, creating new users etc, that I decided to jump in the deep end...and it worked.
Just wanted to let you know my experience in case it helps...