This is the central question in every food poisoning case, and it is proven by building a trail rather than a single fact. The most powerful tool is timing: different pathogens have characteristic incubation periods, so the gap between eating and getting sick points to the likely meal or product. A stool test that confirms the exact bug sharpens that timeline.
From there, the trail widens. Health-department reports and restaurant inspections can show a source and a history of problems. A public-health outbreak investigation or a product recall can tie your illness to a specific source directly. And if others who ate the same food got sick, that reinforces the link considerably.
The freshest evidence — a prompt stool test, saved food or packaging, and a health-department report — is available early, so acting quickly preserves the strongest proof. But a claim can still be built later from your medical records, receipts, and any related outbreak or recall. A review can tell you what the evidence supports in your situation.