If you are connected to wifi, then it may be set to turn off when the screen is turned off.

You can use the video linked below to explain how to do it, in essense:

1. Go to the System Settings
2. Select WiFi
3. Press the menu key
4. Select advanced
5. Change Wi-Fi sleep policy to 'Always'

[Video](http://www.liamwli.co.uk/video.mp4)