The 1369 Coffeehouse in Central Square, Cambridge is well-regarded. There’s also a Peet’s store in/near Harvard Square—I’ve never been there, but Peet’s coffee is quite good.
As far as Boston proper, I don’t know – I tend to stay on this side of the river.