It depends on the story. And how 'realistic' you want it to be, which usually varies from story to story. One thing that drives me insane about both Stargate and Star Trek is that they come to a totally new, different, isolated civilization, that conveniently speaks English! And this is supposed to be 
Science Fiction???
But! Translation can be a pain! Especially something you're reading, and you just want people to communicate. So you can conveniently ignore the fact that they probably speak a different language, have a brilliant translator along, have them learn the language really fast, or make non-communication a plot detail, or have some kind of universal language that everyone knows. Let's see what I do... 
In Prince of Yen they all just speak the same language. Of course, they're two world that originated form the same place so that's not that outlandish, but I just ignore the whole languages diverging probability thing. 
In Legend of Darmoor I have one character bridge both worlds. 
Heroes of Ynoureth I ignore the problem, but they don't travel that far so there has to be some kind of universal communication used in trade and what not. 
In Tia's World he learns the language in a few paragraphs. 
In "Trice" they don't interact from anyone who speaks a different language, so no one has to learn it, but again, there are traders who could translate if I needed them to. 
In Lightning Ranger I ignore the problem. 
In The Third Earth there's a universal language everyone uses. 
There's another scifi story I talk about writing where they have to learn it, and that's going to be interesting because that's a situation where they can't communicate for a while...
So for the most part I ignore it I guess.  
