I would say that the theme of this story is the idea that war (or at least WWI for Italy) is pointless.
For most of the story, it seems as if the theme will be different. All the people in the train tell the couple whose son is leaving for the front that they should not be sad. It seems that the message is that the parents should not be so sad about their son going off to war.
But then the ending of the story changes things completely. It seems that the man who sounded the most patriotic didn't believe what he was saying.
This, to me, tells us that the theme is anti-war. Not even the man who seems most pro-war can seriously believe what he is saying.
You can also see this theme in how many of the other passengers do not seem committed to the war. None of the others really defends the war strongly.
The overriding theme in Pirandello's work is the inescapable premise that the existing orders that helped to provide meaning and understanding no longer apply in the modern setting. The traditional forces that guided individuals such as nationalism, religious fervor, the loyalty in serving one's country, or doing what parents or elders prescribed ring hollow when confronted with the horrific nature of war, specifically World War I. One of the most tragic elements of this particular conflict was that so many who participated believed in the structures that provided guidance and direction. The emptiness of these particular domains help to make the situation of the soldiers and families who saw them perish even more painful. When the wife asks the boastful man about his son and the uncontrollable torrent of tears bursts through, it is almost a confirmation that the structures that helped to provide structure to so many have been rendered useless. It is a moment reminiscent of Yeats' belief in "the centre cannot hold, mere anarchy is loosed upon the world."