Moodle groups can be used to restrict access to an activity, resource, or week/topic block to a particular set of users in a course. Groups can be helpful if . . .
you have your students work in groups for some activities.
you're teaching multiple sections of the same course, but using only one moodle course site (see Using one moodle site for multiple courses for information about setting up a metacourse site). For example, in a class with two sections you could create a group for each section comprised of the students in that section. Then you could create two of each assignment, forum, or other activity - one for each group - and restrict access to the corresponding group. These activities can be invisible to other groups (Separate groups), or other groups can view but not modify them (Visible groups). View of the gradebook can also be filtered by group.
you have any students who require an accessibility accommodation like more time to complete assignments. If you create two groups, one for students who need accommodation and one for those who don't, you can also create two versions of each activity - one with an extended deadline - and restrict access via the groups so students can access only the version that applies to them.
you wish to restrict activities to individuals. For instance, you could set up one-person groups if you'd like each student to have their own private forum that only they and the teacher can see (think journaling exercise).
UMass has some great web pages explaining how groups work:
A note about groups and gradebook: it's a good idea to contact your liaison for help if you use gradebook and your course includes any group-restricted Moodle activities. All activities the teacher creates will display to the teacher in the gradebook as a gradeable item for all students, regardless of whether or not the activity is restricted to a specific group of students. Making sure a student doesn't get penalized for not completing another group's activity requires some special configuration of the gradebook settings.