Theoretically it doesn't; you probably won't get that much of a better education at an Ivy League than a state school if you work hard and do your best.
That said however, attending an elite institution does offer you the benefits of networking and connections, which can be very large keys to future success, especially if you are in a field like law, politics, or finance and how people perceive is important. And of course, you want to at least have decent facilities if you want to be able to do research.
Still, if you are a hard worker and fairly intelligent, it shouldn't really matter where you go. At the same time, if you are a hard worker and fairly intelligent, you will probably end up in an elite school anyway. But if you did screw up high school due to immaturity, it is never too late.