Up to a point, we are, perhaps, what we eat. However, poor diet alone doesn't necessarily cause ill health - many factors can come into play including environment, how active we are, genetic factors and so on. It's not so clear cut that diet alone affects our health though a healthy diet is important, and it is well documented that fast foods, sugary foods, convenience foods, etc are not good for us if eaten regularly, coupled with a more sedentary lifestyle from an early age, (which is more common now than used to be the case, as we tend to drive or be driven to places more frequently, less hard manual work is done than used to be the case, and so on). I would say that it is balance in what we eat that is important, along with quantity. If we partake more calories regularly than we can burn off, then weight gain is likely.
As other posters have pointed out, it's much more complex than diet alone.