“Go and eat your bread with pleasure.” Many verses in Ecclesiastes encourage people to rejoice and have fun in life (cp. Eccles. 2:24-25; 3:4, 12-13, 22; 5:18-19; 8:15; 9:7-9; 10:19; 11:7-8). See commentary on Ecclesiastes 2:24.
“God has already accepted your works.” This verse is not saying that God accepts every “work” or action people do. The Hebrew text does say that God “already” accepts your works, and many English versions follow the Hebrew text in that translation (cp. ASV, CJB, HCSB; DBY; ESV; JPS; NASB, NET; REV; RSV). However, many English translations avoid “already” because many translators think it makes the verse sound like God approves whatever people do, but that is not what the verse is saying. Since the Hebrew text says “already,” it is best to leave “already” in the English versions and then properly understand the verse, because when Ecclesiastes 9:7 is properly understood, it teaches a powerful lesson.
Many people think or are taught that to be truly spiritual a person has to let go of the things of this life and become an ascetic in one way or another. This has shown up in many ways throughout history, with supposedly spiritual people giving up fine food, or wine, or material wealth, or marriage and family, and even giving up talking to others. But these are man-made regulations based on man-made ideas of what would please God
God made the world and many of the things in it to be enjoyed, and things to be enjoyed include food, drink, marriage, and children. It does not draw us closer to God to give up those things (it does occasionally happen that a person becomes so entangled with those things that it helps to give them up for a season).
Ecclesiastes 9:7 is in the larger context of the message in Ecclesiastes that a person has one life, and that life is difficult and uncertain and ends in death. But in this challenging life, God has given the gift of food and drink and companionship in marriage, and the person who engages in those activities does not have to wonder if they are okay with God, the Bible says, “God has already accepted your works.” God cannot make our fallen world easy and fun, but He can give us some things to enjoy, and He wants us to enjoy them, and when we do, He accepts our works.