as hallow man said, it is very hard, because residencies put their best food forward on interview day, so if it is a place you are very interested in, you have to rotate there or you have to watch them for a bit.
in addition to what the people previously said, just think about what you want in life. if you are thinking about ICU, but the IM program you are looking at has minimal ICU rotations, probably a bad program. if the residents seem unhappy or they focus on something minor (our residency rocks because we have a good cafeteria), probably a bad program. for me, it was real turnoff when residencies talked so much about how good of friends they were because it didn't highlight the actual program.