When setting up your diet, it is important to not only take into account your daily allotment of macros, but also the timing of those macros.
When considering protein, you must take into account that you need enough at each sitting (30-40g) to cause a spike in the amino acid Leucine. This spike turns on muscle synthesis and in turn muscle growth.
When considering carbohydrates, you will want the majority (50-70% at least) before, during, and after your training session. This will optimally fuel your session, take advantage of increased insulin sensitivity following the session, and help with muscle protein synthesis.
Fat will be treated the exact opposite as it will affect the absorption and digestion of protein. It should be consumed in small amounts close to the training session with the remainder being spread throughout the day.
Obviously, just getting your macros in every day will be a huge step in the right direction for the majority of the population but, like anything, it can be optimized for those who want to take it to the next level.