How did the civil war affect states rights?
It was why the Civil War was fought in the first place.
The argument presented by the southern states was that the federal government did not have the right to interfere with its internal affairs. And to be fair, the 13 original colonies had fought for the right of self-determination. They actually feared that a strong central government would bring about the dissolution of their individual states into one country. In the end, of course, it was agreed the states would remain autonomous with a strong central government overseeing the larger international affairs.
By 1860 abolitionists were everywhere in the north arguing to end the institution of slavery. Lincoln, the Illinois Republican ran against John C. Breckenridge, the Kentucky southern Democrat. When Lincoln won it was assumed a war would break out.
The south tested the waters of states' rights by seceding from the union one state at a time and declaring they had the right to do so. The federal government said that it did not have that right and so the war began.
The Federal Government said that federal law trumped states' rights where remaining in the union was concerned. Each side pointed to the 10th Amendment as being the answer.
In the end the 14th Amendment addressed the issue by saying that states cannot deny its citizens any rights guaranteed by the Constitution.