Go to settings and select WiFi and press the far left hard button whatever it is called it brings up the settings then go to advanced which is the only option. I turned off network notification and set keep WiFi on during sleep to only when plugged in or never.
I found that "only when plugged in" seemed to work much better than "never" on my phone. This makes no sense, but could possibly be a bug of some sort. To verify, you can download CPU Spy and see if your phone goes to Deep Sleep mode when it's not in use and connected to WiFi. If it doesn't then WiFi isn't really "sleeping" and it's probably using battery, and you should try the other setting.