To quote Wikipedia, the chain of events was:
Flagg gathers his entire collective to witness the execution of
Brentner and Underwood. Moments before they are to be killed, the
Trashcan Man arrives with a stolen nuclear warhead. Flagg conjures a
magical ball of energy in an attempt to silence a dissenter, but it is
transformed into a giant glowing hand—"The Hand of God"—which
detonates the bomb, destroying Las Vegas and killing all of Flagg's
followers...
So by going there, the men achieved:
- Getting Flagg's followers all gathered together,
- Getting Flagg to spin out a lightning ball,
- Just as Trashcan Man brings out the nuke
If all the followers weren't there, some would probably have survived. If Flagg hadn't been angrily executing somebody with a ball of energy, there'd have been no trigger for the nuke. These are two things that the men who walked to Las Vegas contributed.
Granted, the nuke showing up at just the right moment, and Flagg's weapon getting redirected by divine intervention, are outside the effects of the two men, but - if you assume some divine inspiration to Mother Abigail's direction - not unconnected.
The particular men who went were the remaining men from the Free Zone committee. In that role, they had already shown their willingness to sacrifice for the community. So - again, assuming divine inspiration - their trek to Las Vegas takes on the role of (self-)sacrifice, in the traditional sense. To the question in the comments "Were these men special or could anyone have gone?" I would answer that their willingness to sacrifice themselves to likely torture and death is what made them special; others could have done it, but also would have been more likely to falter and fail.
I've always thought Stu Redman going had an Abraham/Isaac overtone to it, where his willingness to sacrifice his newfound happiness was required before he could be spared.