Type one diabetes has always been classified as autoimmune. Insulin-producing cells in the pancreas are distroyed by the body. There may be more than one trigger for this. Viruses have strongly implicated and newly diagnosed Type one diabetics may have a recent history of viral illness.
Type two diabetes was previously thought to be a metabolic disorder. It is usually a combination of reduced insulin production by the pancreas and increased insulin resistance in the tissues. Both were thought to be related to age nd lifestyle factors. It is now thought that the immune system has a role in causing insulin resistance in the tissues, hence the call for reclassification as an autoimmune disease. It isn't yet clear what may trigger the immune system to cause insulin resistance.