The decline of religious affiliation in many Western countries has changed how people mark major life events.