I personally think the best way to manage energy levels through food is to work out the required calories an individual needs to eat. You don’t want to have too much of a deficit, but at the same time you want to avoid too much of a surplus. Once you know the required calories needed to maintain energy levels, taking into consideration your activity levels you can then break it down into individual macronutrients (carbs, fat and protein). This ratio will differ from person to person. 
 
Avoiding high processed high sugar foods is key as they are most often high calorie and low in nutrients. Going for foods in their most natural form is the best way as they are usually lower on the glycemic index and higher in nutrients. This way you will be getting all the natural vitamins and minerals which are important in preventing deficiencies which can lead to fatigue and low energy levels.