Think about it. War is the one topic that can span the gamut of human emotion. Love for one's country, one's fellow soldiers. The guilt of warfare is expected and can create conflict through the denial of guilt. Or conflict can arise between the moral values of a soldier and what he or she is asked to do as a result of the war. Guilt over surviving when another soldier doesn't. It's all conducive to powerful literature.
War has a profound impact upon individuals' lives and upon how society's function, therefore, since the time of Homer, it is a prime topic for discussion in literature. Homer wrote Iliad, the Greek story of the Trojan War; Virgil wrote Aeneid, the Latin side of the Trojan War. From the beginning of literature, wars have been a common topic because of the changes that wars bring to civilizations and to individual people's lives.
Literature is supposed to be about exploring the human condition. It is supposed to show us what people are really like. They say that people show what they are really like under stress. What could be more stressful than war? A life or death situation like that is perfect for exploring what really makes a character tick. I think that is why war is written about so much and has such an impact.
There are many things behind it like each war is different and they always have many effects on society. War is not just the battlefield...it has so many far-reaching effects, such as trauma, financial loss, new social systems, develops the medical and weapons industries etc. Its really very diverse.