Turning on Wi-Fi on demand
Like everyone seems to be saying I too say that you can do this with Tasker and here's a small tutorial

In your profiles screen, click the + button and select application. 

In the following screen that shows with the list of your installed apps, choose the app that you would wish to turn the WiFi on when opened.

Go back and you will be asked to create a new task. Create one and add the action WiFi and set it to on.

Now go back and long press on the task you created and click 'Add exit task' do the same thing as you did before but instead of setting it as on, set it to off.

So now whenever you open that app, the WiFi is turned on and at other times is off.