The tradition is that military science fiction, especially future infantry with political undertones, began with Robert Heinlein’s Starship Troopers. Then came Bill The Galactic Hero and The Forever War and offered a more cynical counterpoint, and a genre was born.
The tradition, it turns out, is wrong. Around 1955, a radio series called 2000 Plus broadcast a story called A Veteran Comes Home [mp3]. Go listen to it. It sounds eerily like the Vietnam-influenced stories that were to come about 20 years later, especially The Forever War. And it could just as easily have been written today, with Mars standing in for Iraq or Afghanistan.