To me the moral seems to be that those who poke fun at religion are foolish.
Many allegorical stories about animals, especially personified ones, have a moral which says something about humans (see Aesop's fables, for example). In order to see what the point of this story is, let's ignore for a moment the context of these characters being ants on a man's nose, and consider what they're saying to each other. They're in an unfamiliar place, and share their impressions of it:
The first ant said, “These hills and plains are the most barren I have known. I have searched all day for a grain of some sort, and there is none to be found.”
Said the second ant, “I too have found nothing, though I have visited every nook and glade. This is, I believe, what my people call the soft, moving land where nothing grows.”
Then the third ant raised his head and said, “My friends, we are standing now on the nose of the Supreme Ant, the mighty and infinite Ant, whose body is so great that we cannot see it, whose shadow is so vast that we cannot trace it, whose voice is so loud that we cannot hear it; and He is omnipresent.”
The first ant's words are entirely prosaic. It has no romantic notions about the place they're in, but is merely concerned with whether it can find food.
The second ant refers to a story told among its people, which is a slightly more poetic way of viewing the place. It sees beyond the immediate concerns of food, and is perhaps interested to visit a place it has heard about without ever visiting before (the "I believe" shows that it's unfamiliar with the "soft, moving land" despite having heard tales about it).
The third ant is overtly religious, describing the place as the nose of a "mighty and infinite" creature so vast that their tiny existence can't hope to comprehend it.
Again, ignoring the context of where we actually know them to be, this could easily be a conversation between three humans of different tribes. Two of them are concerned with the lack of food in the area (one of them also speculating that it may be a legendary place his people tell stories about), while the third is in a sort of religious ecstasy, not caring about the lack of food but instead raving about a Supreme Being.
Thinking about it like that, it's easy to imagine the first two people - atheists, perhaps, or at least not strongly religious - laughing at the third. "Why's he going on about this religious nonsense," they might say, "when he should be worrying about finding food?" Of course, the last laugh is on them, as it turns out the third ant was right all along and they all get wiped out by the Supreme Being.
It seems, then, that the moral of the story is don't ridicule religion, because it may turn out to be true and then the joke will be on you. This was the case with the personified ants of this story, who presumably represent humans.