We did Tallinn-Riga and Riga-Vilnius with Eurolines last summer.
Both journeys are around 4.5 hours. If I recall correctly the tickets were about €18 each and you can book online and print your ticket at eurolines.ee
I have to say that they were without doubt the BEST bus journeys we ever had! The coaches are really comfortable, air conditioned and they show a video but it is not intrusive. The seats are reclining and you can move the outer seat out a bit to give more arm-room. There's a free coffee machine. AND (and this is the best bit!) a WORKING TOILET!!! - very clean too ;-)
They made two stops (again if my memory serves me right). They're great and were not too crowded even in mid-July.
Just one more thing - try to spend more than a day in Tallinn. It's very beautiful and there are like two parts to it - two old towns if you like and both are well worth seeing. We liked Tallinn the best out of the three.
Anywhos enjoy and if you have any more questions you're in the right place here!