Langston's decision needs to be understood in the context of the immediate situation and the broader events that make up the background of "salvation."
Religious belief has historically been such a powerful thing that people who are not "believers" have often been unable to express their separate views. One gets the impression Langston would have been ostracized from the community if he hadn't gone to the front and acknowledged salvation as everyone else had done. One can imagine the pressure upon a young man under these circumstances as unbearable.
Conversely the problem some of us might have with the story is that in the more liberal atmosphere of our own time, in the twenty-first century, fervent religious belief isn't as common a thing as it was decades ago when the story takes place. So the situation might actually be unimaginable to some readers. Hughes implies that the result of his decision was a negative one, because it proved the opposite to him of the intended message he was supposed to receive: he believed that Jesus had failed him by not appearing.
In retrospect, he might have seen that there was nothing else he could have done but go along with what the other parishioners expected. Some people would say that there isn't anything wrong with "pretending" or with being a "hypocrite" when one must do so. If Langston had resisted the implicit requirement made by the congregation that he "conform," he would possibly have had an even greater sense of regret in the aftermath of the church meeting.
There is another dimension to the question of whether or not to acknowledge "faith" even when one feels that doing so is to be dishonest. The acceptance of Christian belief, or that of any religion, is not necessarily a literal thing, but can be seen metaphorically. One can understand and acknowledge the principles enunciated by Jesus or by the founders of other religions without literally "seeing" them or accepting their divinity. So Langston could have viewed his action as a symbolic one, not as the dishonest pose that he probably considered it.
That said, it's still up to anyone to follow their own conscience. What this means is that whether or not he made the "right decision" was up to him alone to determine. So we, as outsiders, really are not in a position to judge his action one way or the other. Under those same circumstances, I'm fairly certain I myself would have done the same thing that young Langston did, for the reasons I tried to articulate above. But all have the responsibility to make up their minds for themselves, and that is the only valid answer to the question of "doing the right thing," in this or any scenario in our lives.