In this story the Earth has been contaminated with radioactivity in the aftermath of a nuclear holocaust. For the story line to be plausible, some explanation of how the colony survived annihilation must be pro-offered. Having them already in space equipped with the basics for survival seems to be the most obvious way to go about it.
Another reason for the Earth to be seen from space is related to the title itself. "If I Forget Thee, O Earth" comes from a Biblical passage related the mourning of the Israelites when held in captivity in Babylon. In it the chief singer laments their ancient homeland, saying that a curse will fall upon anyone who forgets his native land. The same goes for Marvin and the inhabitants of the space colony, destined to never return to Earth themselves but harbouring the hope that one day their descendents will indeed reclaim it.
The setting of the moon offers a stark contrast to the biodiversity of the Earth as we presently know it. The bleakness and sterility of it are an appropriate background for the cautionary tale Clarke develops, intrinsically related to the theme of the story, which of course concerns the conservation of the planet. See the reference below for further information about this.
Arthur C. Clarke elaborated another story along the same idea in his 'The Songs of Distant Earth.' In it the planet itself has been destroyed but spacecraft called "seed ships" have been sent out in different directions throughout space in the endeavor to preserve life and propagated it elsewhere.
I think that the setting makes the story much more moving, and I think that the setting helps to emphasize the point Clarke is making. But I'm not sure that the story is realistic.
To me, the main theme of the story is a warning to people that nuclear war would be devastating. By setting the story on the Moon as he does, Clarke drives the point home. He allows the characters to see the Earth but never to be able to go back to it. This makes the story seem quite sad and wistful. That sense of sadness brings the point of the story home to us in a powerful way.
But still, I don't really think that putting the story on the Moon makes it any more realistic.