Cities are the primary locations to spend a night in Latvia. The larger the city, the more expensive is the accommodation.
Riga has the most accommodation options, ranging from hostels to the most expensive global hotel brands (just like in any global city). However, rather bad Latvian roads mean that it is usually impossible to just stay in Riga and visit other locations from there (except for nearby locations such as Sigulda, Cēsis or Jūrmala).
In smaller cities there are typically hotels ranging from little-renovated Soviet style ones (cheaper) to modern ones, sometimes established within historic buildings. In seaside locations there are more offers (especially Jūrmala), but some may close down in winter.
Short-term apartment rental is often possible through Air BnB and Booking.com but may require collateral and have limited check-in / check-out hours and are comparatively expensive. They are more useful for larger groups or families.
In the countryside, a lot of former palaces and manors have been converted into hotels. They may offer a poetic location and pretty decorated buildings amidst old parks. However, most of the palaces lack authentic interiors as they were destroyed by Soviets to whom palaces were a symbol of former regimes. Palace or manor hotels typically have the word “pils” or “muiža” in their name.
However, not every muiža hotel will be within an impressive building and location, as some of the nobles weren’t especially rich and their “manors” did not differ that much from ordinary 19th-century homes. So, if you want to spend a night within a building built for the richest, you have to read beyond official comments on booking websites.