Try this
$ sudo rfkill unblock all
Also hit the key on your keyboard that switches your wifi on and off.
Another method that usually 100% effective is to simply connect your cable wire to your laptop for a few minutes then unplug it. Reboot and your wifi should be working.
Also as mentioned above network manager is buggy.
I like to use WICD because it is a simple and easy to use network manager. Its a very good alternative to network manager in Ubuntu and it seems to always work when Network Manager doesn't. To install it just open up the terminal.
To download and install WICD
sudo apt-get install wicd-gtk
And now you need to uninstall NetworkManager:
sudo apt-get remove --purge network-manager-gnome network-manager
Now you can find WICD in your menu Start WICD, find the network you want to use and enter the information needed, password, encryption, etcetera and choose Automatically Connect to this network. You should be good to go!
WICD may also be available in Ubuntu Update Manager so you can look there first but it is important to uninstall Network Manager completely to prevent conflicts!!
sudo service network-manager restart
.