This article in The Teaching with Primary Sources Journal explains how primary sources, such as Hammurabi's Code, help students meet the Common Core State Standards. For instance, in middle school, students are required to "cite specific textual evidence to support analysis of primary and secondary sources." When students write opinions about the Code using textual support, they meet this standard.
This PDF document from Middle Tennessee State University lists seven factors teachers should consider when choosing primary sources (such as Hammurabi's Code) for student work: Relevance, Diversity, Accessibility, Appropriateness, Analysis, Context, and Practical Considerations.
The personal reaction essays and Hammurabi poster would work well for middle or high schoolers. The personal reaction essay compares Hammurabi's Code to the U.S. Constitution. For students with special needs or younger middle schoolers, you could simplify the assignment by limiting the topic to the Code itself and why societies need laws.
This WebQuest would work well for high school students. It includes background information, links to sources, audio, and maps. The research assignment requires students to consider the role of class and gender in Hammurabi's Code, and includes a rubric for evaluation.
This is a free, multi-day lesson plan that culminates in students writing a "Letter to the Editor of the Babylonian Star" newspaper, stating their opinion of one of his laws and their reasons for the opinion.
This is a paid resource from Teachers Pay Teachers. Please know that I have no connection to the author, or to any author on the site. I think the activity would be perfect for middle and high schoolers. Students use Hammurabi's Code to find verdicts in six fictitious cases, and must explain their verdicts. This activity received very high ratings and reviews, and is indexed as the top seller under the key phrase "Hammurabi's Code."