The modern theory on the causation of Type 2 Diabetes Mellitus is known as the twin cycle hypothesis
The twin cycle hypothesis of the etiology of type 2 diabetes. During long-term intake of more calories than are expended each day, any excess carbohydrate must undergo de novo lipogenesis, which particularly promotes fat accumulation in the liver. Because insulin stimulates de novo lipogenesis, individuals with a degree of insulin resistance (determined by family or lifestyle factors) will accumulate liver fat more readily than others because of higher plasma insulin levels. In turn, the increased liver fat will cause relative resistance to insulin suppression of hepatic glucose production. Over many years, a modest increase in fasting plasma glucose level will stimulate increased basal insulin secretion rates to maintain euglycemia. The consequent hyperinsulinemia will further increase the conversion of excess calories to liver fat. A cycle of hyperinsulinemia and blunted suppression of hepatic glucose production becomes established. Fatty liver leads to increased export of VLDL triacylglycerol,85 which will increase fat delivery to all tissues, including the islets. This process is further stimulated by elevated plasma glucose levels.85 Excess fatty acid availability in the pancreatic islet would be expected to impair the acute insulin secretion in response to ingested food, and at a certain level of fatty acid exposure, postprandial hyperglycemia will supervene. The hyperglycemia will further increase insulin secretion rates, with consequent enhancement of hepatic lipogenesis, spinning the liver cycle faster and driving the pancreas cycle. Eventually, the fatty acid and glucose inhibitory effects on the islets reach a trigger level that leads to a relatively sudden onset of clinical diabetes.
The observation that bariatric surgery often reversed T2DM was the genesis of this theory, and extreme low calorie diets have confirmed the reversal of T2DM simulating the period of starvation that occurs following bariatric surgery. Interestingly, even though insulin sensitivity is restored in the liver by calorie loss, it is still present in the peripheral muscles.
Another recent observation is that diets high in saturated fat predispose to peripheral insulin resistance.
Conclusions: In a Mediterranean trial focused on dietary fat interventions, baseline intake of saturated and animal fat was not associated with T2D incidence, but the yearly updated intake of saturated and animal fat was associated with a higher risk of T2D. Cheese and butter intake was associated with a higher risk of T2D, whereas whole-fat yogurt intake was associated with a lower risk of T2D. 
So excess calories, particularly of saturated fat, would appear to be the cause of T2DM.
- The American Journal of Clinical Nutrition, Volume 105, Issue 3, 1 March 2017, Pages 723–735, https://doi.org/10.3945/ajcn.116.142034