Samhain, a precursor to our All Hallows' Eve or Halloween celebration, occurred at a time that was a magical for the Celts of Britain. A time when the veil separating the worlds of the living and dead was its thinnest. A time when the distinction between past, present, and future would blur. Many of the earliest Halloween games took advantage of this belief and were based on divining the future.
When the Romans conquered Britain they brought with them the apple tree. The apple was representative of the goddess Pomona, the goddess of fruit trees. She was known for her great beauty and fertility. Romans, although conquerors, Romans were accepting of other cultures and soon accepted Celtic beliefs and the Samhain festival. The two were blended together and the apple became part of the harvest celebration that would become Halloween.
Because Pomona was a fertility goddess and because the Celts believed that the pentagram was a fertility symbol and when an apple is sliced in half the seeds form a pentagram it is natural that they believed the apple could be used to determine marriages during this magical time of year. From this belief comes the game bobbing for apples. During the annual celebration young unmarried people try to bite into an apple floating in water or hanging from a string. The first person to bite into the apple would be the next one to marry.
While the apple may or may not have had any ability to predict the future it brought people together from distant farms and villages who may otherwise have never had contact with others outside their own families. This was very important as most people did not live through their childhoods. Marriage and fertility were extremely important. Without children there would be nobody to carry on your genes. If you didn't have a large supply of children there wouldn't be enough labor to survive. In this respect bobbing for apples wasn't just a game but a matter of life or death.