Yes, there is a law. It's called Article IV, section 3 of the U.S. Constitution.
When a state fails to hold free and fair elections then the Republican form of government in that state has been compromised. Interfering or manipulating a federal election is conspiracy against the Constitution and people. The Executive authority (POTUS) has been charged with the faithful execution of all laws pursuant to the Constitution AND ALSO THE CONSTITUTION ITSELF. That is caps because it's critical.
The president has fundamental Article II authority to ensure the Constitution is upheld. This responsibility exists a priori - before the legislature and its statutory law, and before the interpretations of the SC. If an element seeks to compromise elections, the President is obligated BY LAW to apprehend and bring to justice.
Of course, the President would like a SC ruling to assuage the fears of the American people, but he doesn't need it.
"What conditions must be present for the MIL to overtake the investigations of 3-letter agencies?" (paraphrase)
Sit tight. We win bigly.