The Legal Theory Bookworm recommends A Sociological Theory of Law by Niklas Luhmann. Here is a description:
Niklas Luhmann is recognised as a major social theorist, and his treatise on the sociology of law is a classic text. For Luhmann, law provides the framework of the state, lawyers are the main human resource for the state, and legal theory provides the most suitable base from which to theorize on the nature of society. He explores the concept of law in the light of a general theory of social systems, showing the important part law plays in resolving fundamental problems a society may face. He then goes on to discuss in detail how modern 'positive' – as opposed to ‘natural’ – law comes to fulfil this function. The work as a whole is not only a contribution to legal sociology, but a major work in social theory. With a revised translation, and a new introduction by Martin Albrow.