As far as I can tell, religion serves three main purposes in society:
answers: People don't like uncertainty. And there's a lot of questions without answers in the world. Why are we here? Where do we go when we die? Where does lightning come from? (That one's been answered now). Religion answers (or tries to answer) these questions.
purpose: We want there to be a greater purpose in this world and the life. WE don't like thinking that we have no meaning. Therefore, religion provides one.
Power: In many societies, religion allowed authorities to control the thoughts and actions of the populace.
However, the Uglies society does not need religion because these three objectives have been met. Advanced science has provided most (not all) of the answers. Society plans out the extent of a person's life - their purpose is determined. Also, after 16 they're too busy partying to worry about philosophical matters. Finally, the city has perfect control over their people without bringing religion into it. THerefore, they don't find it necessary.