Thoma rounds up an excellent series of articles describing how concern about moral hazard is overrated.
From a psychological perspective, at least some of the argument about moral hazard seems fundamentally overstated: you will be more likely to undertake risky behavior if you are rescued by someone else, true. However, two points:
1. These banks are not really getting "bailed out." Rather, TARP gave money to the banks in return for preferred stock, most of which, I believe, carried rather high interest rates (10%). So, if BofA receives $50 billion from the feds, they will be paying out $5 billion to the federal government every year for the rest of time. It's not costless. And this is at the expense of other stockholders, because those dividends COULD have been going to the common stockholders.
2. We tend to focus a lot on our own personal losses. For instance, you might say that having rescue helicopters picking up hikers from mountains is "moral hazard" because they don't have a high chance of dying. Well, having a 20% chance of dying is still pretty high to me, and spending a couple months in a hospital isn't fun at all, either.
Some people suggest that we value gains only half as much as losses, meaning that we would need to gain $100 to off-set a $200 loss (in terms of making us happy). If true, that means most people are risk-avoiding, and perhaps a bit of "moral hazard" to encourage risk-taking isn't such a bad idea.