Diet can influence hormones, inflammatory markers, oxidative stress, etc. Same can be said with regard to exercise.
The more minor the hair loss, the more influential of a factor it becomes. For those with moderate to aggressive hair loss, the less influential these things are. It needs to be looked at relatively. A diffusing NW3 is going to need to take drugs in order to have regrowth, and his diet isn't going to matter very much. But someone who is just noticing miniaturization after several years may reap some benefits from these.
IMO the most important role of the diet is that it can help decrease scalp inflammation which in turn provides a good environment for hair to grow.
You can influence hormones by going on an extremely low fat diet, extreme calorie restriction, but these are less realistic for most to adhere to. Nonetheless it can be done.