Latvia is one of the best countries in the world for the fans of the abandoned buildings and ghost towns.
Turbulent Latvian history of growths and declines, occupations and genocides meant that many locations, buildings, and even entire settlements became useless and abandoned as the times went by.
There are diverse abandoned locations in Latvia:
Soviet military installations. As the westernmost land ruled by the Soviet Union (1940-1990), Latvia was heavily fortified, and these installations became obsolete after Soviet troops departed. The highlight is the entirely abandoned Skrunda-2 ghost town (once home to 5000), but other sights include the repurposed VIRAC radar near Ventspils (the surrounding buildings are abandoned) and a former nuclear war bunker for Soviet elite near Sigulda (now a paid attraction).
Russian military barracks. Before the Soviet Union and brief independence, Latvia was ruled by the Russian Empire (until 1918), which had also heavily militarized it. The highlight of the era is an entire Karosta navy town north of Liepāja (once home to 30000), now half-abandoned (ex-prison reopened as a museum). Another former Russian installation with numerous abandoned buildings is the Daugavpils fortress. Unlike Soviet barracks, Russian Imperial barracks are of quite elaborate architecture.
German wooden villas, palaces, and cemeteries. Germans once made up the majority of the population in most Latvian cities, but the community was destroyed by World War 2 and Soviet Genocide. Many of the elaborate buildings of the rich Germans, such as wooden villas at the seaside cities (e.g. Jūrmala) and entire romantic castle-like palaces remain either fully abandoned (e.g. Gulbene palace) or partly abandoned (e.g. burnt-out Cesvaine castle). Riga great cemetery, partly destroyed by Soviets and vandalized, is also impressive-though-sad.
Jewish heritage. Latvian towns, especially those of Latgale, once hosted a significant minority of Jews, but it was decimated by emigration and Holocaust. Small numbers of remaining Jews no longer need many buildings, and thus many synagogues became abandoned (although they are now being repaired).
City buildings. Latvian cities suffered a decline of population recently due to emigration and before that due to Soviet genocide. The population of ethnic Latvians is at its lowest for 100 years. As such, many buildings in the cities such as Riga are abandoned as well, e.g. apartment blocks. Large public Soviet buildings are even more prone to abandonment, as they often have little use in a market economy where smaller institutions may be more profitable.
While many abandoned buildings in Latvia are out-of-bounds for visitors, many of the best ones are either accessible or impressive even from the outside.
The sheer numbers of abandoned structures have been controversial in Latvia. Many people have preferred them renovated or destroyed, but both are costly. However, these days it became popular that key abandoned and semi-abandoned locations are treated as tourist sights on their own, even without renovations. This means, however, that if a location is open, tickets were often introduced for visitors (e.g. to Skrunda-2 town or Cesvaine palace).
Despite this, hundreds of tourists come to key abandoned sights in Latvia every day including foreigners. They visit the abandoned 19th and 20th-century buildings in the same fashion as they would visit abandoned medieval castles, of which Latvia also has many.