American Civil War armies overwhelmingly fought in close order formation, due to the sheer size of the forces involved as well as the tactics.
While it is true that a looser skirmish type formation was used in some situations and in some terrain, it would be incorrect to say that armies "reverted back" from the AWI. It wasn't as clear cut as that or linear as that.
The armies of North America in 1861 fought in the same type of formations that were being used around the world and by the major European powers.
Both sides used a tight two-rank formation for regiments with one or two companies of skirmishers out in front.
As volley firing degenerated into independent fire and from casualties dropping from the line, battle lines would tend to "drift" and "get looser" just by the nature of men shuffling and shifting during firing. And of course many mass charges which began as textbook tight formations began to loosen and lose their form as they neared their intended target or goal.
Another topic which is relevant to the kinds of formations they used is the topic and myth of entrenching – i.e. that Civil War armies "gradually adopted" entrenching more as they "learned" of the rifle musket's power and accuracy. Nonsense. Entrenchments and earth works were not new to 19th century warfare or 18th Century warfare. The American Revolution saw the building of extensive earthworks and redoubts, Saratoga is a great example. They didn't build them because of fear of the flintlock, they built them because entrenched and fortified armies are more difficult to assault and are made more defendable the better their works are. American Civil armies used entrenchments and earthworks way before Petersburg in 1864. Works appeared around Manassas in 1861, and of course Washington D.C. was completely ringed by forts and works practically from the outset of the war.
But one thing that must be clarified about the American Civil War is that it most certainly was not the "first modern war" as it is so often portrayed. It was in truth one of the last of the great Napoleonic-type wars, and it came very late in the era.
The reason why Pickett's Charge stepped off elbow to elbow wasn't because commanders were still dumb to the fact of the rifle musket or because they "hand't adapted" to new weaponry, that's all nonsense. The reason why the Union assault at Fredericksburg stepped off elbow to elbow wasn't because the "weapons were ahead of the tactics". The rifle musket wasn't the miracle weapon as it had been mythologized as(but that's a topic for another thread).
Civil War armies fought with rifle muskets, but they largely fought their battles AS IF they were still armed with smoothbores in terms of ranges. The best way to sum up the Civil War was that it was 1861 armies still using 1812-1815 formations in terms of density, and equally important they still used their newer weapons as if they were fighting in 1812-1815 – i.e. smoothbores.
Because of that, and because statistically artillery accounted for an astonishingly tiny percentage of the overall casualties(about 93-95% from minie balls, about 5-7% from artillery balls/shells/canister), armies massed up, got in close, and delivered fire at smoothbore ranges. The high casualty rates in the Civil War were not because of the rifle musket. It was because when formations are elbow to elbow and shooting at each other at 50-75 yards or less, people are going to be hit, regardless of the weapons used.
And lastly – do not forget, that despite Civil War armies using elbow to elbow linear formations and firing at close ranges, the hit ratio was STILL only about 5%(Took about 100 minie balls being fired for 5 men to be hit). That's astonishing.