The hunters are formed when Jack decides that they will need a group of kids who will get meat for the rest of them to eat. Ralph agrees with this idea because he is eager to appease Jack, having just beaten Jack out for the position of Chief. Ralph figures that by giving Jack an important role, Jack will be satisfied with Ralph's chiefdom.
The role of the hunters is, at first, to hunt. They go out and try to gather meat for the boys to eat, while the other boys build shelters and gather fruit, etc. The hunters also take turns monitoring the fire on the mountain, in case of rescue attempts. Since most of the hunters were originally members of a choir with Jack, they naturally assume the roles of his followers as well. When Jack breaks off from Ralph, it is the hunters who form his new tribe with him. Eventually, they become hunters/enforcers/bullies all rolled into one.