One of the elephants in the SF airlock is communicating with aliens. Most of the time it is pointedly ignored and they all speak english or you get some story about them having listened to our radio and television broadcasts for years and decoded our language. This idea in itself can be mined for comedy gold. Imagine an alien ambassador who studied human language by watching reality tv (the most vulgar word in english is 'beeeeeeeep'-ker.)
I'm mostly going to dwell on aliens and humans who consider language making noises with their mouths. Creatures communicating with different patterns of plaid or pheromones may be a later post.
Star Trek pulled out the universal translator which scanned brainwave patterns to find key ideas and concepts common to all intelligent life. It found the patterns it recognized and created a grammar for them. It wasn't exactly universal. Some exotic life forms (anything requiring visual effects) required tweaking. At east speaking to aliens was acknowledged as requiring some work.
In the Traveller universe we had a sprawling interstellar civilization with a common tongue (at least within space ports) surrounded by aliens who generated languages on d66 charts. Not a lot of effort is made to show technology to bridge language barriers which you'd expect in a universe where a planet of near gods sits next to people who look like a Norman Rockwell painting.
Using robotic translators is popular in some galaxies far far away. Though the default model is a sort of androgynous humanoid I'm sure some savvy diplomats get female bots because the human males pay more attention to them. Me, I'd get a talking dog 'bot because they have great jokes.
I'm not sure how good any computerized translator will be. In human language we determine a word's meaning using etymology (words it resembles that we know the meaning), syntax (the place in the sentence in English will determine the word's part in speech) and context. Context can have very deep and elusive meanings requiring a deep knowledge of the speaker's culture and conventions of speech.
I'm sure computers could make a good go of the first two methods but the last requires a lot of data about a speaker's culture for translating idioms and the like (well we can learn about their culture through discuss ... d'oh!) I'd test a potential translator program with, 'It's cold enough to freeze the balls of a brass monkey.'* If it returned something nautical and SFW I'd follow up with, 'Let's eat, Grandma' to make sure it was putting the commas in the right place (by all means avoid, "I'll hold the nail. When I nod my head my head you hit it." Dangling participles can kill you.) I'm sure a translator's 'autocorrect' feature will be as welcome as it is on texting.
People usually picture translators as just having everyone speak english for the television audience though the different characters will hear their language of choice. I think having a HUD display which gives subtitles is just as viable, maybe more so. A pair of subtitle glasses for example could give you color coded text to indicate the likelihood of a correct translation or cultural references if dealing with a known language. With a sufficient tech level you could also add voice stress analysis and have a bullshit detector thrown in to flash red when someone is lying like a politician.
Of course that could set diplomacy back a good amount.
*In the British Navy** cannonballs were stacked on deck in tidy little pyramids using a rack known as a monkey, because the British needed a silly name for everything. The racks were brass of course to avoid sparks near guns that were slightly less dangerous to the crews around them than the enemy. On a particularly cold night the racks would contract from the cold and the cannonballs fall out and roll about the deck leading to a bunch of seamen running around chasing their ... as you can see translating and idioms can be very involved issues indeed.
** Except I just found out (thanks Chris Vermeers) this explanation is bullshit. It turned out they really meant brass monkey statues and until the 20th century usually referred to the statues' tails and noses. It seems you would need to be on Titan for the cold to be enough to make a rack contract enough to make the cannonballs fall out. ***
***However, just because it is physically impossible doesn't mean it's unavailable as a figure of speech and I still think it's enough to give a translator a breakdown especially with the context of an urban legend to contrast to the actual derivation. Also I would still shy away from that whole 'when I nod my head you hit it' test. Especially with some of those aliens you run into. Klingons and the Zangid are already bastards without the out of a translator to blame Murder One or Two on.