There are so many myths regarding the causes of diabetes. One is that eating too many sweets or carbohydrate –rich food leads to diabetes. This is not true but the fact remains that both these types of food lead to obesity which is one of the main causes for diabetes.
Another myth is that stress leads to diabetes. This again is not true. But stress can affect the immune system which can trigger type 2 diabetes. Besides, stress can aggravate the existing symptoms in someone with diabetes.
Type 2 diabetes is caused when:-

The body receptors that respond to insulin fail to do so (insulin resistance). This may send the wrong signal to the insulin-producing pancreatic cells, which produce excessive insulin

The insulin that is produced is abnormal and is therefore substandard and non- functional

There is not enough insulin available
Risk Factors include -

Increasing age

Fairly inactive lifestyle –exercise fewer than 3 times a week

Obesity

Gestational diabetes

Pancreas -damaging illnesses

First degree relative with diabetes

Ethnicity –If you are American Indian, African American,, Asian American, Hispanic/Latino, Alaska Native or Pacific Islander.

Blood pressure is increased to 140/90 mm Hg or above.

Abnormal cholesterol levels –

HDL “good” cholesterol level is below 35 mg/dL

or triglyceride "bad cholesterol" level is above 250 mg/dL.

History of cardiovascular disease.

Certain medications such as -

beta blockers,

steroids,

oral contraceptives,

thiazide diuretics,

and phenytoin sodium

Polycystic ovary syndrome, also called PCOS in women.

Tuberculosis in adults.

Impaired glucose tolerance (IGT) detected during previous testing

Insulin resistance associated illnesses such as acanthosis nigricans, which is characterized by dark, velvety rash around the neck or armpits.