Type 2 diabetes mellitus is an important preventable disease and a growing public health problem. Epidemiologic and interventional studies suggest that weight loss is the main driving force to reduce diabetes risk. Landmark clinical trials of lifestyle changes in subjects with prediabetes have shown that diet and exercise leading to weight loss consistently reduce the incidence of diabetes. However, from these studies it cannot be established whether dietary changes alone play a significant role in preventing diabetes. Here we review epidemiologic and clinical trial evidence relating nutrients, foods and dietary patterns to diabetes risk and the possible mechanisms involved. The differential effects of carbohydrate and fat quantity and quality, and those of specific foods and whole diets are discussed. Importantly, most dietary components influencing diabetes risk have similar effects on biomarkers of cardiovascular risk and inflammation. The conclusion is that there is no universal dietary strategy to prevent diabetes or delay its onset. Together with the maintenance of ideal body weight, the promotion of the so-called prudent diet (characterized by a higher intake of food groups that are generally recommended for health promotion, particularly plant-based foods, and a lower intake of red meat, meat products, sweets, high-fat dairy and refined grains) or a Mediterranean dietary pattern rich in olive oil, fruits and vegetables, including whole grains, pulses and nuts, low-fat dairy, and moderate alcohol consumption (mainly red wine) appears as the best strategy to decrease diabetes risk, especially if dietary recommendations take into account individual preferences, thus enabling long-time adherence.