Is Euro more or less accepted in Riga and Tallin as well as
the local currency
The local currency is preferred. Larger establishments will take your euros but don't expect exact exchange rates.
Instead of trying to master the muddle of exchange rates, I would use my credit card where possible. I had no problem using it in Tallinn.
Buying local currency is difficult in most cities. It is difficult to buy the correct amount so you don't have a surplus when you leave.
If you have acquired euros before arriving, try using them. Some merchants may accept them. You will never know in advance which ones will. Try them.
Exchanging extra notes is pretty easy between these cities so that is not too much of a worry if you are stuck with extras.