Wifi battery saving tips or automation
Tasker is an app that can be used to automate changing settings on your device, based on various events like when you leave range of a wifi AP, or when you enter a geographic area.

You can have a look through the Tasker tag here for some idea of the jobs it can be used for, and how to configure it.