In the latest Google Webmaster Help video, Matt Cutts discusses whether or not a site that is hosted by a hosting service that also hosts spam, has to worry about a negative impact on rankings. The answer is pretty much no, but he talks about some "corner cases" where it's a little more complicated.
"Typically a hosting company has a lot of different stuff on it. Some of it will be good. Some of it will be bad," says Cutts. "There will be some spam, but just because you happen to be on an IP address or using a hosting company that also hosts some spam, that doesn't mean that you should be affected."
"There have been a very few situations...I remember several years ago there was a really bad hosting company," he says. "I'm not even sure whether you would call them a hosting company. It was something like 27,000 sites of porn spam and like two legit sites. On one IP address...so if you were one of those two legit sites...in order to catch the 27,000 porn sites...you know, that was something where we were like, 'Well, okay that's really pretty excessive.'"
He says they haven't looked at IP address in a "long, long time" in terms of gathering sites. In most situations, you don't have to worry about it.