HLA association is only seen in Type I diabetes and not in Type II.
However, the role of genetics is stronger in Type II as you have 20% of patients having first degree relative affected while the percentage is only 10% in the case of Type I.
The most acceptable theory so far about the development of Type I is autoimmune destruction of the islet cells possible triggered by a virus in a genetically susceptible individuals.
While in Type II it's mainly the metabolic syndrome with obesity and insulin resistance that are playing role in the pathogenesis. Some papers indicated a possible autosomal dominant mode of transmission in Type II patients.