I get this question a lot. A LOT. I get it from clients. I get it from friends. I even get it from the coolest fit-tech companies in the world! And it's a GREAT question. How we fuel our bodies affects our performance in the gym, our recovery (and results) from a workout and even the microscopic cells that make us what we are. Food is important. And if you're trying to out exercise a crap diet (or even a "meh" one) you're likely running in place. If what you're doing is working for you and you just want to maintain, cool. Keep doing what you're doing. But if you want to change (lose weight/body fat, gain muscle, get stronger) consider changing you're pre- and post-workout nutrition first.
I'm not a doctor and I don't even play one on TV. I'm a personal trainer with a nutrition certification. This means I've studied a ton of stuff. I've worked with hundreds of people. I've passed a lot of tests. I have personal, professional and academic experience. But I'm NOT a nutritionist or dietician. So I never tell people what they "should" or "have" to eat. I simply direct generally healthy people (those without disorders such as Diabetes, Anorexia, Crohn's, Hypothyroid, etc.) to credible information so they can make their own choices with consultation from their doctors and other healthcare professionals. Capish?
That said, here is how I fuel my body pre- and post-workout. My clients who follow suit (see caveat above) typically respond well physically and mentally. This isn't the ONLY path that works. But it's a solid one worth investigating. I wish I could take credit for it. But the smart folks at Precision Nutrition get all the credit. Definitely take the time to read Better Version of "My Plate" for a full explanation of the graphics below and more resources including a plan for those on plant-based diets. And read this piece from the Poliquin Group; they know their sh*t.