Not all states, it was mostly the southern states.
Many of the Southern States agreed with Jim Crow Laws due to the fact that the Southern States were big users of slavery. The southerners used Jim Crow Laws as a was of maintaining their racist ideology after all slaves were freed during the American Civil War.
It wasn't just the Southern States but they were the states that treated the blacks worse, e.g: They tended to have more KKK members with their own police forces being members. Some Northern states had Jim Crow laws but after the integration of schools, the Northern states decided to steadily drop their Jim Crow Laws.