There are so many, but here are my faves:
Cambridge:
Grendel's Den - Right in Harvard Square. It's been there for 50+ years and the vibe is it's a bar that has been there for 50+ years. Something about that is very charming to me. A plus is that Pinocchio's Pizza is pretty much across the street, so you can get a late night slice or three after drinks.
Plough & Stars - A favorite of many. A very cozy vibe and great live music.
State Park - 70s basement vibes. Wood paneling, a bunch of cool/weird neon signs and vintage lamps, and great food. Also pool and I think shuffleboard
Daedalus - Maybe more of a restaurant, but I love it. Also in Harvard Square
Somerville:
Highland Kitchen - Incredible food and a small bar. Mostly a sit-down place, but they have good drinks too.
The Burren - One of the best places in the Boston area and maybe my favorite. The best live music around. There are usually some Irish/folk/instrumental bands playing in the front room and some larger acts in the back room.
Saloon - A speakeasy, so to speak. Great drinks.
Olde Magoun's Saloon - Great spot for food/drink if you're near Magoun Square
Bronwyn - German bierhall with great food