Yes and no.
Certain foodstuffs, both natural and synthetic, have been banned because they were shown to significantly increase the chances of getting cancer.
Of the food that people commonly eat, there certainly is a link between diet and cancer. For example, in Japan, there is a higher rate of stomach cancer because of their salty diet rich in pickled foods. We know it isn’t genetic because Japanese people living in Europe don’t have an elevated stomach cancer rate.
In Europe, certain food are linked with bowel cancer. These include fatty foods and red meat, especially cured pork products like parma ham and salami, as well as processed meat. Additionally, burnt and smoked food also contain small amounts of cancer-causing compounds. These are the same as the ones found in cigarette smoke (but they are much less harmful when eaten than when inhaled). In fact, smoking fish/meat was originally developed to preserve food, so toxic compounds which coat the food prevented bacteria from spoiling it.
However, I wouldn’t say that you shouldn’t eat red, cured, smoked or barbequed meat at all, just that you shouldn’t eat them every day or in excess. Enjoyed as part of a healthy and balanced diet full of fruit, vegetables, fibre and fish, they pose no risk to your long term health.
I don’t think there is any food or drink that consumed in normal amount could either trigger or, on the opposite, protect you from getting cancer.
It’s all a matter of measure, like with everything. One BigMac won’t kill you, but if you have a diet that is solely based on BigMac, then you are definitely going to have problems (maybe cancer would be the last of your problems in that situation!).
So, the best that you can do to reduce the risk of developing cancer is eat a little bit of everything, plenty of fruit and veg, don’t exaggerate with fat, salt and sugar…but to be honest that is the recipe for a healthy balanced diet that would help you protecting from a lot of other diseases!