There is an adjustment in Settings->Wireless & networks->Wi-Fi settings in the menu Advanced called Wi-Fi sleep policy adjustment giving 3 settings :
When screen turns off, Never when plugged in, Never
Also, if you use an app like WiFi Buddy or WiFi Analyzer, it is right up front in the Settings menu, not quite so deep to access.