In the case of Crohn's disease it is the absence of worms. With diabetes it is too few bacteria. Tests on mice showed that a completely germ free environment when young increased the frequency of mice developing type 1 diabetes. Much fewer mice got diabetes when exposed to bacteria.
Future treatment could involve people taking medication containing bacteria. Potential sufferers of diabetes can already be identified by testing their genetic make-up.