Masechta Sanhedrin, 56a, derives and lists the Seven Noachide Laws. Dinim is one of them. Dinim means that in any civil society, courts of law and a police force must be set up. Courts of law implies a legal system must be erected. According to Rabbi Yitzchak, the Rabbis require that any legal system be modeled according to Jewish Law. Rabbi Yochanan states that the nations of the world must devise their own legal system, according to their own lights. In this second case, the idea of Mishpat Tzedek, Righteous Laws, must be instituted by the Legislature which are then enforced by the Courts and the Police Force.
The Rama has a Tshuva in which he discusses this issue. After several pages, the Ramah concludes that the Halacha goes with Rabbi Yitzchak. Nevertheless, to-date, history has decided this matter according to Rabbi Yochanan, as any student of English and American Constitutional History knows.
Here are three PDF’s, one being the Tshuva of the Rama on this topic. The Second and Third by Rabbi Yisroel Lifshitz, the Tiffereth Yisroel on a little understood section of Pirkei Avot:
משנה מסכת אבות פרק ג משנה יד PDF
2nd משניות זכר חנוך – ח (נזיקין ב) משנה PDF