Lucky for you, because court records were always documented, records of crime and punishment are some of the most well documented things we have of this period. My specialty is England, so I can give you more information on that.
In England, there were two ways in which you were put on trial. If you were in London, you were tried at courts in the city such as the Old Bailey. If you were in the countryside and the crime was more serious, you would wait to be tried by assize courts, which were traveling courts that would meet in county towns several times a year.
Unfortunately, most of the assize court cases were documented in Latin, making them inaccessible to many modern readers. Yet notorious crimes were often circulated as broadsheets, telling people of notorious crimes, punishments for them and warning them against the acts depicted in them. Many of these are easily accessible online, especially if you are part of an institution which has access to databases such as EEBO (Early English Books Online)
You can also look at petitions for pardons to learn about crimes and punishment. These were either written by prisoners or someone on behalf of them to local courts such as quarter sessions, which can be accessed through county archives, or to even the monarch. For the latter, many original petitions can be found on the British State Papers archive online.
If you are interested in cases in the capital however, there is a terrific and FREE database called the Old Bailey Online This is a FANTASTIC source which allows you to search by person, crime, dates, gender, outcome, and more and learn much about all things criminal in 18th century London (and earlier or later). Many historians rely on this archive.