Carbohydrates play an especially important role as they provide the quick energy needed for exercise. Carbohydrates, found in foods like grains, fruits, vegetables, beans, and dairy products, are your body's favorite source of energy, but this is not the only role that carbs play. They also ensure mental sharpness and aid in the metabolism of fat for energy.
Without energy you're not at your peak performance and can't lift as heavy. Neither can you progressively overload which is one of the most important things for muscle growth. Increasing the load and getting stronger won't happen if you don't fuel your body the energy it needs to get stronger.