For law abiding characters, the punishments that are in place should be effective deterrents. Non-violent violations and misdemeanors are just going to be common regardless of the penalty, especially traffic violations. Speeding fines are high in my state but people will still speed as a matter of convenience--even through work and school zones. To a certain degree I think we should expect the same in-game, regardless of the posted fine or penalty. This is partially due to human nature but also to the fact that we have maybe 300-500 people in a city and county that would realistically have tens of thousands. The potential of harming another person or being seen/caught doing something by another person is therefore greatly diminished. Would higher fines help? Potentially, but it would need to be a hefty increase.
As a whole though it's a difficult thing to pinpoint just due to the sheer diversity of characters and their players and how they react to consequences. Unfortunately, there is some IC/OOC crossover that complicates the matter and makes a purely IC or OOC solution troublesome. Not all players care about their characters to the same degree, for example. A character with an established history, extensive assets, and relationships will have a lot more to lose than a new or throwaway character that may not yet have had (or planned to have had) long term development. Of course there are exceptions to this but I have frequently seen people simply namechange a character to get out of the consequences of their actions when they realize they may be going to jail for a long period of time or just CK in jail because it's not worth the trouble to them.
Which brings me to one of the common complaints I have heard which is that jail and the consequences of the justice system are "not fun". Philosophically, I do not think punishments should be fun. If they happen to be, such as an active and vibrant jail RP, then that's a bonus and great and I would very much like it to become that. However, the crimes that bring lengthy jail sentences are typically ones of a violent or serious nature that affected someone else's character. As @GHawkins mentioned, if you do a "not nice" thing to someone else, you should be willing to accept a "not nice" thing to yourself. Just because your character's actions were fun for you does not mean they were fun for others but you do run into that catch 22.
Considering all this, I think an effective deterrent is one that inconveniences not only the character but also the player. While it shouldn't be an excruciating experience for the player, there should be some inconvenience to them to balance the inconvenience they caused to others. Methods of OOC avoidance that people will use to dodge jail or the consequences of their criminal activity should be addressed. There should be heavier restrictions on namechanging while under arrest or in jail and asset transfers should be locked for the duration of a sentence. This is especially true for people charged with or serving sentences for violent crimes like murder which feels way too common a solution to disputes on the server.
That said, I think it would also go a long way in enhancing punishments by providing RP opportunities for people in jail, whether they might consider it fun or not. Maybe a script job to earn a little money or more partnerships with community organizations for classes, therapy, medical checkups, etc. That way, even if the prisoner-prisoner RP is less than desirable, there is something to do.