Diet is one of the most important external factor shaping the composition and metabolic activities of the gut microbiome. The gut microbiome plays a crucial role in host health, including immune system development, nutrients metabolism, and the synthesis of bioactive molecules. In addition, the gut microbiome has been described as critical for the development of several mental disorders. Nutritional psychiatry is an emerging field of research that may provide a link between diet, microbial function, and brain health. In this study, we have reviewed the influence of different diet types, such as Western, Mediterranean, vegetarian, and ketogenic, on the gut microbiota composition and function, and their implication in various neuropsychiatric and psychological disorders.