This is actually a pretty good question, and one that we need to offer interpretations for rather than strict answers.

Literally, according to the book, the settlers return because they feel allegiance to their home nations and to their family member who were left behind. This actually isn't that much of a stretch in Bradbury's time. World War II had just ended, and many had returned to their homes to fight for their countries.

The story that Bradbury tells, however, was different. As you noted, there was a nuclear war on Earth. How does one fight in a nuclear war?

So, perhaps the answer is different. It is never explicitly stated by Bradbury, but it is possible that the Martian colonies still needed supplies from Earth to properly function and the nuclear war put further shipments in jeopardy.

Additionally, it is possible that the colonists returned to Earth out of some feeling of complicity in the nuclear war. In other words, they may feel some guilt for escaping to Mars with war brewing on Earth.

Truthfully, though, I have to agree with what seems to be the basis of your question: the return to Earth is illogical. I know I would not choose to fly back to a nuclear war.