From the Baseball Prospectus book, Baseball Between the Numbers:
Protection is overrated. There's no evidence that having a superior batter behind another batter provides the initial batter with better pitches to hit; if it does, those batters see no improvement in performance as a result. Additionally, it's very rare that a situation arises in which run expectation drops after the pitching team walks the batter at the plate. Therefore, if the pitching team does walk a batter because it would rather pitch to the following man, it is almost always making a mistake by opening the door for a big inning. The situation changes late in close games as the importance of a single run begins to trump that of many runs, but even in those situations, the difference between the two batters would have to be extreme.
In short, most of the hand-wringing and scrutiny of batting orders is for naught. Batting order simply does not make that much difference. Managers tinkering with lineups so rarely shun convention that most of their changes would affect their teams' output by only a few runs over the course of a season. Sorting a lineup in descending order of OBP yields the most runs, but players with high SLG can offset a low OBP as early as third in the lineup. The conventional lineup's most egregious flaw is that it costs the game's best players about 18 PA per lineup spot per season. If Barry Bonds led off instead of hitting fourth, he would see about 54 more PA per year, adding perhaps 10 runs to the Giants' offensive output. Teams without a player of Bonds's caliber could gain about 10 runs (1 win) a year by routinely batting their players in order of descending OBP. Furthermore, managers worrying about protecting their best hitters need not fret. Situations in which the pitcher would gain by walking the initial batter to pitch to the following man are so rare that employing an optimal lineup order would eliminate nearly all of them. Intentionally walking any batter in a correctly ordered lineup is nearly always a bad decision.