WW1: All Quiet On The Western Front is the definitive book on the subject. It's told from the German point of view, and more than adequately the horrors of trench warfare.
WW2: The Winds of War, War and Remembreance. These two novels do a brillaint job of covering the entire scope of the war...