I know, I should know this, but I don't. I knew the soldiers used guns but didn't think much more about it. (In a quick search of my book, I found more "rifle pits" than rifles and more "musketry" than "muskets.") I recently read (or re-read) The Red Badge of Courage, and I noticed the soldiers were just loading or reloading and firing, not aiming. So was the idea to just shoot in the direction of the opposing line and hope you hit someone? In other words, hitting someone or being hit was a matter of luck? They weren't trained to hit targets? It's not like aiming at an animal when you're hunting?
You can't aim at what you can't see. and when you can see them, they can see you.
But in any case, if they're shooting at you, you might as well shoot back anyways.
The battlefields in America were, more or less, wooded, and more or less uneven ground. The enemy wasn't always visible, though at least the smoke of their firing would be.
So while many of the troops in the war had rifled muskets, in ranks, in combat, the lines of battle in fighting each other frequently delivered a rapid and heavy "musketry"... the smoke further obscuring their vision. For example, Cosmo Bailey of the 7th Florida Volunteers at Chickamauga noted of their fighting about the East Vineyard Field on Sept. 19, 1863 could distinguish no clear targets. "I stood some time without firing looking for something to shoot at," said Bailey. He was disappointed in this. Seeing his comrades firing indiscriminately he joined in too, firing to his front "right ahead of me."
Leander Stillwell of the 61st Illinois, at Shiloh in 1862 describes the effect generally...
John Worsham of Jackson's "foot cavalry" mentions of the battle of Cedar Mountain in 1862 that before such fighting, it wasn't always clear exactly where the enemy was, where they were covered by some woods or chance of the ground:
But that the smoke in the woods from the heavy firing obscured the scene to the line of battle such, that their enemy's advance had to get really close before they even knew they were there...
Even in such close combat, to the extent it occurred with the enemy
very near, aiming might not be attended to with greatest care. Henry O. Dwight, the adjutant of the 20th Ohio, in describing a close combat between his regiment's line of battle and the 7th Texas at the battle of Raymond, Miss., May 12, 1863, noted that taking too much time to carefully aim was a matter of some nerve...
"The fact is when you start to draw a bead on any chap in such a fight you have to make up your mind mighty quick whom you'll shoot. There are so many on the other side that look as if they were just getting a bead on you that it takes a lot of nerve to stick to the one you first wanted to attend to. You generally feel like trying to kind of distribute your bullet so as to take in all who ought to be hit. So a good many get off who are near enough to be knocked over the first time."
He mentions a sergeant determined to get his man, and in carefully aiming:
"One of the sergeants shouted to me as I stood beside him, but I could not hear. He was loading his gun, and he roared again in my ear, "They've got me this time sure, but I'm going to have one more pop at them." He took careful aim and fired, and fell backward into the brook, with a bright red hole in his shoulder. Then I understood what he meant."
The particular value of the gun sights, and aimed fire, was in skirmishing as an action commenced. Skirmishers were men deployed from the line into an extended order, taking cover and generally taking aim when firing. This is where the men had freest use of their arms, not being closely crammed together in two ranks. Usually a battle commenced between the skirmishers sent forward between the lines to drive each other, to cover their respective lines of battle, and to develop the exact position of the enemy where concealed. Here, where the men were free to take cover, etc., they could make such use of their riflemanship as they could.
Carleton McCarthy's "Detailed Minutiae of Soldier Life..." gives a generic description of what a soldier could see in combat. Starting with the skirmishers deployed in front, and concluding with the advance of the line of battle...
A skirmish line...
...
It is notable that he doesn't bother to describe what anyone particularly does, or sees, in the firing line of battle, as their busy loading and firing... (see Stillwell's account above).