The correct option is B. "Had been eaten."
The complete sentence would read: "By the time we arrived, all foods had been eaten by guests." This construction uses the past perfect passive voice, which is appropriate here as it indicates that the action of eating was completed before another past action (arriving) occurred.