I've been on both sides of this types of questions. In general, I prefer this over the traditional white-boarding exercise, as I find this more realistic. Particularly if the homework is something similar to the type of work that my team does. It allows us to better evaluate the coding and problem solving skills of the candidate, specially when compared to one of those "gotcha" coding questions that most companies still use in their interviews.
But I know that is has its downsides. The main one is that there's no way to control how much time the candidate devotes to this, and this is unfair with people with more responsibilities (work, family, etc). As an interviewer I always tell the candidates to only spend 2 or 3 hours in the homework. But everyone always spends a lot more on it.