The main role that civilians played in this war was to provide the material things that were needed to fight the war. Soldiers in the war needed all sorts of things to fight effectively. They needed weapons, of course, but they also needed tents and clothes and shoes and food and many other things. The civilian population’s labor was therefore important because it was they who grew or made many of the things the soldiers needed.
Civilians played a number of other lesser roles as well. They (particularly women) acted as nurses. Some of them acted as spies. They helped to maintain the morale of the soldiers by writing them letters. These were perhaps less important than the more material help they provided by working, but they were significant even so.
One last role the civilian population played was to put pressure on political leaders. These pressures had some effect on what the leaders did. For example, it was clear to President Lincoln that he needed victories as the 1864 election drew near because otherwise he might lose to George McClellan, who was running as a peace candidate. Civilian pressure thus pressured him to push for a more aggressive conduct of the war.