How to keep Pandora / Slacker music apps continue to play music after the display goes dark?
If you have any "battery-saving" apps, they may turn off your data/Wi-Fi while your phone is sleeping. Be sure to check those first.

Also, depending on your phone, you can go to Settings > Wi-Fi > [Menu] > Advanced > Best Wi-Fi Performance and toggle that on to see if it helps.