Looking into the Team You'll Be Working With
Looking into the other people who have worked for the company in question, both currently and in the past, is an important step. How long have past employees stayed at the company? With tools like LinkedIn, you can read up on the sort of people who are currently with the company, as well as who has left.
Rapid turnover can be a major warning sign of cultural problems. Defining just what is an unusually high rate can be difficult (faster turnover can be the norm in some areas, especially when the shortage of good programmers mean that many tech companies are constantly recruiting from their competitors). But if you can see that anyone who could easily land a job elsewhere has done so, you should be concerned.
Dig deeper if you have the opportunity to do so. With the many social networks you have at your disposal, you can see if you know anyone working at the companies you're applying to or if you can ask a mutual acquaintance for an introduction.
Consider asking about the current team during your interviews. You may hear a few subtle hints, or you may hear an obvious warning sign. If, for instance, your prospective manager speaks poorly of current team members or is excited about having you replace someone still on the team, you may be walking into a major issue. You may also notice that some members of the team you'll be working with don't get along well with the rest of the team—walking into that sort of situation is never pleasant.
A little Googling about team members may also be in order, especially if you're looking at a company that encourages its employees to be part of the larger tech community. You can get a feel for who is well thought of and who may be painful to work with from open source mailing lists, conference comments, and even the occasional blog post.