Obtain a bachelor's degree from a 4-year university. To prepare yourself for getting into a top-notch law school, attend the best university possible. Ivy league schools such as Harvard, Yale and Princeton will prepare you well for law school and give you a leg up when it's time to apply.
There is no specific major requirement, many law school applicants have bachelor of arts (BA) degrees in subjects like political science, sociology, history, business and economics. Every discipline has application to the field of law and therefore your future role as a judge. The more rigorous your undergraduate courses, the better prepared you will be for law school. [1]
Your performance in college will determine whether you're accepted into law school, so get the highest grades possible. Complete assignments promptly, keep up with your reading, and study adequately for exams.
Get real-world experience by completing an internship at a law firm during your undergraduate years. The sooner you get familiar with the legal world, the better.