It seems to me that in European conflicts of the time (like the Crimean War) cavalry was still a fairly prominent unit for major assaults, while in the US Civil War -to my knowledge- it seems like the bulk of the battle was decided by infantry and cavalry remained more of a scouting force than anything else. Was this the case?
Two related questions: When did infantry in European armies stop drilling for anti-cavalry formations like the infantry square? And when did Americans?
I can speak to the American use of cavalry as a military asset during the Civil War. In that regard, the cavalry's primary purpose throughout the majority of the war involved three crucial functions (1) reconnaissance, (2) troop screening, (3) and behind-the-lines raiding. Improvements in rifle technology essentially retired frontal cavalry charges against organized, set lines of infantry. All it would take would be one stiff volley of fire to fell an approaching cavalry charge, which would collapse after the first line of horses went down and tripped up everything behind it. When cavalry did attack infantry during the ACW, it did so when the infantry were in marching columns, during retreat, or otherwise not in line and ready to receive them.
The cavalry's most valuable application during this period was as a fast-moving reconnaissance body that could scout ahead and report back on larger enemy movements. This information would be crucial to a commander looking to steal a march on a foe, or thwart their offense thrust.
As it related to this, another crucial role of the cavalry was to provide screening cover so as to counter this kind of reconnaissance. Having your cavalry between your army and an enemy body of cavalry trying to figure out what you're up to was very valuable!
Lastly, if given the authority to cut loose and do so, cavalry detachments could run wild behind enemy lines cutting telegraph wires, ripping up railroads, burning supply depots, and generally disrupting operations. This would have an obvious, direct effect on whatever they were screwing with (telegraphs, railroads, etc) but it also drained resources that would have otherwise been at play elsewhere, which is an important consideration all on its own.
So to answer your question, yes, in the American Civil War, the cavalry were not used as an offensive tool all that much (although they certainly made attacks on both sides). As for when the American army stopped drilling in anti-cavalry formations, I couldn't say, as I haven't read anything specific to that. Perhaps another contributor can add something on that?
[Sources - James McPherson, 'Battle Cry of Freedom'; Jay Winik, 'April, 1865'; Bruce Catton, 'Grant Moves South']