Christians say grace before a meal to follow the examples set by Jesus and the apostle Paul in the Bible to thank God for their food. Many other world religions have similar practices of thanking a higher power before meals.
The book of Matthew in the Bible has two examples of Jesus praying before meals, found in chapters 14 and 15. Chapter 14 verse 19 specifically states that Jesus thanked God before starting his meal, and Luke chapter 24 verse 30 contains a similar example. Acts chapter 27 verse 35 shows the apostle Paul following the same tradition.
Judaism, Islam, Baha'i and Hinduism all have traditions for giving thanks before or after a meal. Birkat Hamazon is the Jewish mealtime prayer. Jewish people started this tradition based on Deuteronomy chapter 8 verse 10, and different types of food have different traditional prayers. The meal ends with four benedictions.
Islam has four prayers for meals. Muslims say one prayer before the meal, one when starting to eat, one after the meal, and a prayer of supplication if they forgot to pray at the beginning of the meal. The Baha'i faith has two prayers for people who wish to thank God before a meal. Hindus use chapter 4 verse 24 of Bhagavad Gita to give thanks before a meal.