[The officer:] "Have you ever heard of our former Commandant? No? Well, it isn't saying too much if I tell you that the organization of the penal colony is his work. We who were his friends knew even before he died that the organization of the colony was so perfect that his successor, even with a thousand new schemes in his head, would find it impossible to alter anything, at least for many years to come. And our prophecy has come true; the new Commandant has had to acknowledge its truth." (3)
This is when the officer first introduces the old Commandant. The reverence in his tone is obvious, and he seems to ascribe something almost superhuman to him. Not only is the colony created entirely by him, it's perfect – like an actual divine creation. Nothing about it could be done better. Also interesting he uses the word "prophecy" – which reappears on the Commandant's headstone.
[The explorer:] "Did he combine everything in himself, then? Was he soldier, judge, mechanic, chemist, and draughtsman?"
"Indeed he was," said the officer, nodding assent, with a remote, glassy look. (10-11)
You could read this passage as again making something almost godlike out of the old Commandant. He was capable of doing everything. It's a bit hard to know what to make of the officer's "remote, glassy look." Is it reverence? Nostalgia?
[The officer:] "Have I not tried for hours at a time to get the Commandant to understand that the prisoner must fast for a whole day before the execution. But our new, mild doctrine thinks otherwise." (20)
"Fasting" has religious overtones, and fasting before an execution adds an extra element of ritual to it. The killing of the prisoner starts to sound like a ritual sacrifice. Note also the disapproval the officer voices about "mildness." It's clear he finds something important in the hardness of suffering.
[The officer:] "And believe me, if my indictment doesn't drive him out of the conference hall, it will force him to his knees to make the acknowledgement: Old Commandant, I humble myself before you." (29)
The officer wants the new Commandant to get on his knees before the old Commandant and "humble himself." This sounds very much like a gesture of obedience to a god. Especially since the old Commandant died a while ago, so it's not as if there's anyone there for the new Commandant to humble himself before.
"The old man's buried here," said the soldier, "the priest wouldn't let him lie in the churchyard. Nobody knew where to bury him for a while, but in the end they buried him here. The officer told you about that, for sure, because of course that's what he was most ashamed of. He even tried several times to dig the old man up by night, but he was always chased away." (48)
This is the only indication we get of more recognizable "religion" in the colony, and apparently it's at odds with the cult of the old Commandant. One wonders what role it played during his leadership. Was it there and suppressed by him, or co-opted by him for his own purposes? Is it a new arrival? Probably not, since it was already there by the time he died. And why was he forbidden burial? Was it because of his inhumanity, or because of aspirations on his own part to be like a god? If you read the story allegorically and do actually make of him into a kind of god figure, it's unclear what to do with this passage.
This was what it said: "Here rests the old Commandant. His adherents, who now must be nameless, have dug this grave and set up this stone. There is a prophecy that after a certain number of years the Commandant will rise again and lead his adherents from this house to recover the colony. Have faith and wait!" When the explorer had read this and risen to his feet he saw all the bystanders around him smiling, as if they too had read the inscription, had found it ridiculous, and were expecting him to agree with them. (43)
The old Commandant's epitaph. This is the most obviously religious language applied to him in the book, speaking of "prophecy," "faith," and of him rising from the dead. It sounds uncannily like Christianity, with the resurrection of Christ and the commandment to wait in faith until he comes again. The people in the colony don't take the epitaph seriously. If you don't give the old Commandant any kind of metaphorical or allegorical significance, then the thought of a long-dead, megalomaniacal (really full of himself) ruler of a penal colony coming back from the dead is pretty ridiculous. But what about if you do?