I didn't find rent to be all that different. You're looking at about $650-700/month with roommates in Davis Square, $1100-1200 for a 1BR in Davis/Porter. In Mountain View, you're looking at about $800-900 with roommates or $1400 for a 1BR. Harvard Square and South End rents are actually more expensive than many places in Palo Alto and Mountain View.
The big difference is in cars: you don't need a car to get around most places in Boston, but you do need one in Silicon Valley. And if you live in places of Boston where you do want a car (like the Somerville/Medford border, or much of Waltham, or western Arlington), the rents fall by $200-300/month to compensate. So then you really are looking at close to a 2x difference with Silicon Valley.
I'd agree that Mountain View beats Harvard Square and the South End on cost, but I don't think Mountain View is nearly as fun to live in as Harvard Square. Harvard Square has a subway stop, lots of stores, restaurants, and Harvard. The cheap part of Mountain View has a maze of twisty little streets, all alike.
(I should admit that I've never actually lived in Mountain View, but I did live over the line in Palo Alto, and I went to Mountain View a lot.)
Again, it's the car vs. pedestrian dichotomy. I live in Mountain View now, and there're plenty of stores, restaurants, Stanford, etc. within a 15 minute radius. It's just that that 15 minutes requires a car. (Well, technically I can walk to downtown from my place, but it takes me 20-30 minutes.)
I used to live in the Boston suburbs, with most of my friends in the Porter-through-Central area, and there's tons of stuff within 15 minutes of Harvard Square. It's just that that 15 minutes is all on foot. You don't want a car in Boston, as parking can frequently be as expensive as rent.
If you like driving, Silicon Valley is fine. If you'd rather walk, Boston is way better.
The big difference is in cars: you don't need a car to get around most places in Boston, but you do need one in Silicon Valley. And if you live in places of Boston where you do want a car (like the Somerville/Medford border, or much of Waltham, or western Arlington), the rents fall by $200-300/month to compensate. So then you really are looking at close to a 2x difference with Silicon Valley.