Having a consistent Internet connection on your MacBook Air is definitely important. There is an article specifically for troubleshooting Wi-Fi issues on Lion that may help with this:
There is a section in that article that matches your issue:
Symptom: The network connection drops unexpectedly
- Your Mac may not not stay connected to your Wi-Fi network reliably.
- Your Mac may stop accessing the Internet during use.
Try the steps in that section including the portion about not being able to connect to Wi-Fi after waking from sleep.
Thanks for the additional information. What I would try next is resetting System Management Controller:
- Shut down the computer.
- Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
- On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
- Release all the keys and the power button at the same time.
- Press the power button to turn on the computer.
Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
You can find the full article here:
If this still doesn't help, it would be time to take it in to be looked at. You can setup an appointment at a Genius Bar by clicking on the following link:
I have tried the pressing shift-control-option with power button trick, but nothing seems to happen when I tried it.
After I power up again, the problem of not being able to turn back on the Wifi still remains.
I don't know if there are other more obvious ways to reset the SMC, that is, to have some sign saying that it has been reset.
But I think to have the machine looked at would be a waste of time, since the problem only happens sometimes, it will take a couple of hours to have it reproduced, and even then, it may not be able to show what the problem really came from, rebooting the machine will make it work again.