http://en.wikipedia.org/wiki/Social_contract Most religions stem from this theory and then they add in their agenda.
The social contract alone is enough to promote law and order.
Come on, most people don't go to church, they don't pray every night, and when they want to rob from the neighbor it isn't God that stops them, its a felony charge.
I think its pretty obvious, that with out bashing religion int he least bit, you can rationally and logically say that it has nothing to do with law and order. People don't hurt other people because they don't want to start a riot.
Plus, can't you just be forgiven in most religions? Isn't that like, the greatest loop hole ever to do what ever you want?