I would say that the most important function of groups in a society is to provide their members with a sense of belonging. This allows people to feel connected to one another and helps society cohere.
One clear example of a group is a family. Familes are influenced mainly by the norms that are set by the family leaders (parents or grandparents, usually). Sanctions vary, but they are meant to keep the younger members (usually) from behaving in ways that are unacceptable to the family.
Less intimate groups, such as companies, have norms and sanctions as well. Management can sanction workers for failing to live up to the firm's norms. This can take the form, for example, of suspending a worker for breaking rules.