Personally I think diet, to a degree, is largely overrated.
Our food sources suck and come from land thats over farmed and animals doped up on drugs and fed food that also comes from overfarmed land and they were never designed to eat. So with that in mind I am 100% convinced that its impossible to get all of the nutrients we need from diet alone.
People respond to foods differently so its hard to come up with a one size fits all diet. Many of the most popular like paleo, primal, adtkins etc are all very limiting in the food choices and couple that with peoples taste preferences following any one of them generally greatly reduces the sources you have for nutrients making it even more likely you wont get what you need for optimal function.
Just be smart about it. Avoid processed foods and refined sugars. Eat unprocessed fruits, vegetables, meat and nuts. Log what you eat and portions, track basic nutrients and monitor macro breakdown. then adjust intake as needed.
You ever see those commercials for workouts where they show crazy 90 day transformations and wonder how they do it? They burn calories and carefully eat.
Is it really that easy???? yes and no. IT SHOULD BE and for many people is but then again for many people its not that easy.
Ive been on this forum for a long time now and I see people here who have no problems simply altering their body by careful monitoring of diet and exercise. But there is a whole other group who no matter how they eat and no matter how they exercise just can not seem to gain muscle or lose fat.
When the body is functioning optimally or near optimally altering its composition should not be difficult process. Assuming your eating fairly clean and exercising a slight deficiency in calories and you should lose fat. If your not, then your body is not functioning optimally and you are likely deficient on various nutrients that have caused a degradation in the functioning of various organs in your body which in turn after time will start to show in altered hormone levels etc.
The key is to address these deficiencies with supplementation and once the body reaches sufficiency in the various vitamins and minerals your body can restore normal function..