As the other answers describe, geography gave the Confederacy the home field advantages of being more familiar with the landscape, needing shorter supply lines, and dealing with a friendlier civilian population. It also worked in their favor because they were more accustomed to the hotter climate and local diseases. Large swaths of the South are home to the preferred habitats for disease-carrying mosquitoes. Indeed, numerous battles, such as Bull Run, Vicksburg, Chickamauga, and the Peninsular Campaign, were fought in the warm swampy areas that mosquitoes prefer.
Though most survive it, malaria can be fatal. This mosquito-transmitted disease killed as many as ten thousand Union soldiers. Malaria was rare in the northern states. Therefore, few Union soldiers had experienced it before. Even though the majority survived, sick soldiers were unable to fight and were a burden when the army was on the move. It is thought that as many as half of all Union soldiers contracted malaria at some point during the war. This disease greatly hampered Union efforts. While southerners still succumbed to malaria, they tended to be more resistant to it overall because of a lifetime of exposure.
The climate itself also aided the Confederacy. Union soldiers were less accustomed to the southern heat. Heatstroke and dehydration was a problem for northerners unaccustomed to the heat. General Robert E. Lee was aware of this advantage when he wrote in 1863 that "[Union] troops ordered from Virginia to the Mississippi at this season would be greatly endangered by the climate. ... The climate in June will force the enemy to retire."