If you have enough time you can visit two cities near Tallinn, Tartu in Estonia and Helsinki in Finland.
Tartu is the second largest city in Estonia. It is often considered the intellectual center of the country, it is home to the nation’s oldest and most renowned university, the University of Tartu. More info in Wikipedia.
There a lot of buses and trains every day from Tallinn to Tartu and back.
After some hours walking we enjoyed some beers near the river, in Väike Vine. Unfortunatelly the establishment is closed since last Septembre, but I think that a new establishment is getting ready.
If you have more free time you can visit Helsiki, the capital of Finland. You must take a ferry from the Port Tallinn and two hours later you will be in Helsinki. There the prices are higher (very higher) than in Estonia, but it is worth it.
It was summer and we could enjoy some beers in the terraces of Senate Square. Next summer this event will move a few blocks away in the city center.