The judge said the Constitution gives states and Congress the authority to regulate elections, and that Trump’s requirements violated the separation of powers.