Three languages may be useful in Latvia: Latvian, Russian and English.
While Latvian is the only official language and the only one you will notice on most signs, Latvia is effectively a bilingual country, with a third of its population speaking Russian.
Latvian is the sole official language of Latvia and the mother tongue of 62% of population (90%+ in villages and towns outside Latgale). All the public signs in Latvia are Latvian.
Historically, Latvian was threatened by its low status (19th century) and Russian migration (20th century). Sweeping National Awakenings saved the Latvian language both times, but Latvians are still protective of their tongue. After all, “Latvian language” is a key definition of Latvian nation.
Spoken by merely some 1,5 million people worldwide, Latvian is not a language many foreigners learn. However, knowing this, Latvians are especially happy when non-locals try to speak it. After all, even many Russophone locals refuse to learn Latvian.
As a Baltic tongue, Latvian has the most similarities to Lithuanian.
The Russian language is spoken natively by some 37% of Latvia’s population, most of them in the cities and Latgale. This includes not only ethnic Russians (26,9%) but also many other minorities (Ukrainians, Belarusians, Jews). The importance of Russian dates to Soviet occupation, when many settlers were moved in.
Back then, Russian was a required language to everybody, including ethnic Latvians. On the other hand, Russians were not required to learn Latvian. As such, Russian became the true lingua franca of increasingly multiethnic Latvian cities. Non-Russian Soviet immigrants, unable to get any cultural, educational or entertainment activities in their original mother tongues, relied on a massive network of Russian language institutions, adopting the Russian language as native over one or two generations.
Because of these past policies many Latvians born ~1980 and older speak Russian fluently and Russian is still the most common foreign language to know. Given the history of persecution of Latvians by Russians however, the Russian language is regarded suspiciously by ethnic Latvians. Some would refuse to speak it, others would feel insulted that a foreigner speaks Russian to them (as if he/she would regard Latvians to be Russians). The younger generations often genuinely do not speak Russian at all.
Nearly all the Soviet-era bilingual signs were removed, but tourist industry still has many materials in Russian for tourists. There is also a thriving Russian-language media, aimed at local minorities. The Soviet network of Russian schools and cultural institutions has been somewhat reduced but remains open.
After independence (1990) English has replaced Russian as the most common foreign language to learn. The younger generations of ethnic Latvians usually speak English far better than Russian (and would switch to English when communicating with foreigners).
English is also very common in tourist materials. Fluency in English is a requirement for anybody wishing to work in the tourist industry.
As the “main language” of the “prestigious west” English also became popular for increasingly trademarks and songs by aspiring local bands.
Other minority languages
There are four additional minority languages spoken by some 0,5%-1% of population each: Belarusian, Ukrainian, Lithuanian and Polish. However, their use is mostly limited to family and a few churches. The youth of respective ethnicities often speaks Russian or Latvian even among themselves. Only in some villages of Semigallia and Latgale does Belarusian, Lithuanian and Polish still have a bigger impact.
Latgalian language / dialect
Some would classify Latgalian, spoken by some 15% of population (mostly in Latgale), to be the third most popular language of Latvia. However, others see it as a distant dialect of Latvian (which has acquired more Polish and Lithuanian (and less German) loanwords due to a separate history of Latgale). For a long time Latgalian was expected to die out in favor of either standard Latvian or Russian, but after independence restoration (1990) it became more protected. Nearly every speaker of Latgalian is fluent in Latvian, and the “fans” who create music or write literature in Latgalian mainly do so in order to preserve their culture rather than because of being unable to express themselves otherwise.
Formerly significant languages
Three other languages were once extremely important in Latvia but were since nearly eradicated by foreign occupations:
*German language was the lingua franca of Latvia’s cities well into 19th century. After all, most of them were established by Germans and long had German majorities. Old German inscriptions may still be seen on some buildings, but the German minority was destroyed during World War 2 after a long natural decline. Nevertheless, German remains popular as a second foreign language (after English) to learn due to high numbers of Germans in Europe.
*Liv / Livonian language (similar to Estonian) was once indigenous over much of Gulf of Riga coast. Wars have slowly reduced its area to some fishing villages by the 19th century, and over the 20th century it nearly died out. Independent Latvia (1990) sought to protect the language but it was too late and in 2013 the final native speaker died. Today Liv is learned by some just as a hobby.
*Yiddish language was historically the main language of Jews, who made a significant portion of the Latgale population in the 19th century when Latgale was the only place of Latvia they were allowed to freely settle. 20th-century tribulations however severely reduced the Jewish community (emigration and World War 2), while even the remaining Jews usually no longer speak Yiddish (most have switched to Russian). Yiddish thus may only be seen on some old inscriptions.