Capitalize before a name when it is the formal title. It is the formal title for members of the U.S. Supreme Court and for jurists on some state courts. In such cases, do not use “judge” in first or subsequent references.
See also AP Style Judge, AP Style Supreme Court of the United States, and AP Style Titles.