There as many purposes and functions to ritual as there are types of rituals. There are secular rituals, such as the daily morning ritual of waking, eating and bushing teeth in a certain order and timing. These rituals give order and meaning to our daily activities. They provide comfort in the mundane and a sense that the world is as it should be. Much like a good luck charm, if these rituals are not observed, they can make the rest of the day feel just that little bit off, or wrong somehow.
There are legal rituals that signify to society that some sort of contract has been entered. These often overlap with religious rituals and may employ religious language. The ritual of the swearing in of a President of the United States, or a judge are secular examples of these rituals. Weddings, and funerals are great examples of where the religious forms overlap with the legal. Both express a legal state of being that affect how a persons personal holding will be dealt with in the future.
Religious rituals provide a framework in which a person or group of people may leave the profane and enter into a state of sacred actions. During these rituals, the participants use certain symbols combined with actions, to interact with one another on a spiritual level. Contact with extra natural beings, such as Gods or spirits, can also be part of this type of ritual. These rituals rely on common myths and symbols to convey meaning to the actions of the congregation. A Catholic Priest holding up the Eucharist and proclaiming it the blood and body of Christ is using the story of the crucifixion as well as the myth of transubstantiation to create a moment of deep meaning for those who share the Catholic worldview and culture. Religious ritual can provide a reinforcement of a cultural view point of reality while being deeply moving to even those who do not share the theology.
Ritual ultimately is a structure that we use to define the brief moments of our lives.
The Definition of Ritual; http://anthropology.uwaterloo.ca/courses/Anth311/Ritual%20Defined.htm
Bibliography of Social Anthropological Theories of Ritual Meaning and Function, Sharon Morris (1996); http://pages.swcp.com/~ldraper/slim/biblios/morris.html
Anthropology of Religion: Overview of Religion; http://anthro.palomar.edu/religion/rel_1.htm