I noticed a while back (and was cruelly reminded last night) that whenever I eat chocolate before bed I get nightmares, and I literally never get nightmares, ever. But it wasn’t my fault! White Lindor chocolate tastes so gooooood
Twice when I was a teenager, I tried a junk food experiment where I would abstain from junk food unless I had a lucid dream. It gave me nightmares (some of the worst I’ve ever had) where I would become lucid at the last minute, both times I tried it.
Other than that, I haven’t really noticed any correlations. I don’t eat junk food now (but don’t tie it to dreams in any way) and it hasn’t affected my dreams one way or the other.