The capitals were important as they were the main residing places of the government, for both work and rest.
The fact that the CSA government moved capitals 3 times was a major deciding factor as to where the war went, as it allowed them to get work done faster (Montgomery to Richmond) and escape from the Union army (Richmond to Danville)
And because of the CSA moving capitals so often, this had a very good effect for the CSA and a bad one for the U.S.A. This is because the constant moving of locations allowed them to be untraceable as to where they would be, making it harder for the U.S. to figure out where the CSA government was located.
Jefferson Davis originally wanted to go into the deep south after the summer heat became an issue in Montgomery, due to them possibly being safer and the ideas that the CSA upheld would be more reinforced, however the Confederate Congress ended up shelving this and went to Richmond, Virginia as the state had offered a place for the government to reside along with resources for them to use.