Did he violate the Sokovia Accords? I'm not being facetious here, I'm legitimately asking. The Accords prohibit creating AI. He didn't create AI, he just turned it on. Does that violate the Accords? And, lets be fair here, if Hayward violated the Accords activating the dead Vision, then Wanda clearly did as well by creating the new Vision in Westview. No one from the FBI seems to care about that.
Also, he kicked Jimmy off the SWORD base, which he clearly had government authority to do (if he didn't, the arrest would have happened 3-4 episodes earlier). After that, Jimmy was clearly trespassing and Hayward had all the authority he needed to handcuff him.
Furthermore, can the FBI actually arrest you for violating the Accords? I don't think so. It's an international agreement. There would be no handcuffing or being taken into custody without intervention from the US State Department. Certainly not the on-site arrest that we see.
And, most notably, did anyone actually know that Hayward turned Vision back on? We know, because we saw it (and SWORD people would). But none of the characters in the show actually know that. For all they know, White Vision could have been created by Agatha or Wanda, or simply accidentally. There's no witnesses and zero evidence.
Hayward is just a shoehorned designated villain. He just gets arrested because he's not friends with the protagonists.