Pre Workout: You want to prioritize carbohydrates and moderate protein and minimize fats and fiber.
Carbohydrates: Carbs are your main energy source for your brain and body. Sufficient carbohydrates before your workout will allow you to tain harder and longer while feeling energized.
Protein: Adding in moderate protein pre workout may help stimulate protein synthesis and prevent muscle breakdown.
When and what you eat may also depend on the time of day that you workout. If your session is at 5am (or early morning right when you wake), you may not feel hungry for something substantial. I do still recommend eating something small to give you the energy for your session. In this case, you can experiment to see how much is enough (a banana, piece of toast, etc). If you feel weak or have low energy, feel light headed or dizzy, you probably need to eat more. If you feel totally fine and can push yourself then you are probably eating a sufficient amount. Food gives us energy. Your sessions are to make you stronger. If you cannot put forth enough energy to increase your strength and ability week by week, that's a problem (so eat!).
If you're working out in between meals, time your pre workout snack appropriately. Having had breakfast or lunch 3-4 hours ago and not eating before your session isn't ideal (for the same reasons listed above).
If you are working out after a meal, allow 30 minutes to an hour to digest and prioritize carbs + moderate protein within that meal.
Post Workout: You want to prioritize fluids (drink water!), protein and carbohydrates
Protein: During your workout you are creating micro tears in the muscle (this isn't a bad thing!) and protein helps repair and build muscles. Depending on the individual, a general guideline is a MINIMUM of 20-30 grams of protein within an hour post exercise. HOWEVER, if one day you don't make this happen, I promise you won't lose your gains. Data has shown that yes, timing is important for protein post workout to initiate protein synthesis, but it is less dire if your overall protein consumption throughout the day is adequate (general recommendation would be .8-1 g protein per lb of bodyweight). General tip: prioritize it post exercise, but don't lose your marbles if you don't do it one day.
Carbohydrates: Carbs will help restore your muscle glycogen. Carbs help maximize your recovery between sessions, and prioritizing them post workout will help your body begin the recovery process.
Pre Workout Ideas:
Oats+berries
Fruit+protein bar
Toast+jam
Post Workout Ideas:
Fruit and protein smoothie
Protein source+grains/potatoes+veggies
Greek yogurt+fruit
*A NOTE* Just because I say to minimize fats and fiber pre workout, doesn't mean you can't have them at all! They just shouldn't be the priority. Yes of course you can still have an egg on toast (fats from egg), some berries (carbs+ fiber), peanut butter on toast (fats from nuts), etc. Simply just prioritize carbs and moderate protein.