Anecdotally, I think that your UG does matter. And it matters in the sense that law schools-- particularly the top law schools-- know what they're getting when they get applicants from HYPS and some of the other Ivies. It's easier for them to quantify what a 3.8 or 3.9 from HYPS means vs. a 3.9 from some random school whose graduates don't frequently apply to top law schools. I think it is possible for some of the HYPS applicants, especially those with strong LSAT scores or strong GPAs but not both, to sneak into top schools that would have been harder for them to get into numbers wise had they gone to a less prestigious school. For example, I went to HYPS undergrad and have a few friends at HYS law schools with GPAs around 3.7 and 173-177 LSAT scores. That does sometimes happen with applicants from state schools, but I think it's a tougher sell. To me, the numerical advantage for HYPS grads is given because of the competitiveness of the pool of students at HYPS UGs. It is very possible to be an extremely gifted and capable student at those places and end up with a 3.7ish GPA. That can't necessarily be said for someone at a less competitive institution because the quality of students who attend those schools isn't as high. We could have debates about the measures of this "quality", but in order to get into HYPS to begin with, one usually has to have very high grades, test scores, and interesting extra-curricular achievements in HS. And amongst that pool, some of those high quality students come out in the middle of the class. That's not necessarily true of less prestigious schools. If a student scores very high on the LSAT in addition to having a solid but not spectacular GPA from a reputable school, I think adcomms are more likely to give that person the benefit of the doubt than a candidate with similar numbers who hails from a less well-known academic pedigree.
Similarly, I have friends with GPAs in the 3.9+ range who have LSAT scores in the 168-171 range who have also made it into HYS. According to LSN that doesn't happen as often for students at state schools. I think the reason it happens for HYPS applicants is because, again, getting a 3.95 GPA at HYPS UG is impressive. Regardless of what people may say about grade inflation, those schools don't give out A's for free. The standard of work is very high and there are a lot of super-qualified people to compete against for grades in courses. Someone who does that well has shown that they are consistently close to the top of the class in a lot of different arenas. I think the adcomms feel that having this sort of record speaks volumes about those students' ability to succeed academically in challenging environments similar to those found at the most selective law schools. Thus, the adcomms more willing to disregard a less competitive LSAT score (for HYS) in favor of the stellar work that those applicants have already completed.
There are also some intangible factors involved. For example, going to HYPS UG gives a lot of students advantages (internships, extra-curriculars, jobs, etc.) that they wouldn't have had access to normally. The name of your school does get you into the door at some places, which helps in terms of building up your resume. It's much less likely that a graduate of Univ. of Washington, say, would have had an opportunity to present at a parliament as a summer internship or would have worked at McKinsey. There are people like that at HYPS because those schools have established internship programs that send students to do those things each summer. Those kinds of softs get people bonus points in admissions. I'm sure some of it is just an old world, inside baseball kind of deal. Schools like their own graduates. It's not an accident that the GPA floor for Harvard applicants at HLS or Yale applicants at YLS (et. al.) is lower than for applicants from other schools. I would guess that some of that discrepancy accounts for the competitiveness of HYPS students. Some of the favoritism also probably comes from the fact that schools want to make money. It is in Stanford's interest when a Stanford graduate does well and comes back to the Farm for law school. That student is much more likely to donate money to the Stanford than they might be if they went somewhere else for their graduate studies. So, accepting some more borderline candidates to the law school who went to the same school for UG could be a boon for the university. I also feel that a big part of admissions is convincing the adcomms that you can do well at a given institution. It's much easier to make that argument if you've already succeeded at Harvard and want to go to HLS for law school than if you went somewhere else. There was something about that environment that brought out your best work and allowed you to thrive and make positive contributions to that community. If you went to University of Alabama and are applying to HLS, how you'll fare in that particular environment is less certain simply because you haven't experienced it before. Those things get taken into account by adcomms as well.
I will say that I think the boost only generally helps borderline candidates at top schools. I think it the UG boost only comes into play for applicants who are within a few tenths of each other in GPA and a few points of each other on the LSAT. So a 3.8/171 Harvard and a 4.0/173 state school might have a similar chances at the HYS even if it doesn't seem like it from the numbers. A 4.0/175 state schooler will probably always be a much more competitive applicant than a 3.5/ 165 from Yale. And justifiably so. I also think that law schools are interested in people who have made the most of the environments that they are in. They seek to enroll classes made up of students who come from varying types of undergraduate institutions. So, as long as you've done well where you are, schools won't hold it against you that you didn't go to a big name undergraduate school. In fact, being a strong applicant from the University of Wyoming might help you contribute to the geographic diversity of a law school. Bottom line: Law school admissions is mostly a numbers game, so high numbers (GPA +LSAT) are probably still your best bet no matter where you went to college.