This is a highly debatable question. Some authors argue for a direct link between mental compromise and delinquency and criminality, while others argue that it is not the fact that the individual is mentally deficient but rather how that person was socialized that determines the degree of delinquency or criminality. This in turn revolves back to the age old debate of nature versus nurture which has been examined for decades and is still being argued to this very day.
Early criminologist's such as Beccaria, Bentham, and Rousseau all researched this very question to some degree and arrived at very different theories and conclusions. Lombroso, in particular studied the relationship between biology and delinquency/criminality. He compared the effects of the environment to effects of biological traits as they influence criminal behavior.