There's an old parable about the difference between heaven and hell that I've always liked, it goes something like this:
After passing away a man is given a tour of heaven and hell, in the first room is a long table, full of good food and drink, on both sides sit wicked people who cannot bend their arms. They can reach the food on the table but cannot bring it to their mouth. The chamber is full of the wailing of hungry souls continually tempted by a great feast they cannot eat.
Horrified by the scene the departed is taken to see heaven. He is guided to another room, with the same table, the same food and on both side of the table virtuous people who cannot bend their arms. Despite the identical situation they are happy and well-fed. The departed turns to the tour guide and says, "This is the exact same conditions as hell, but the situation could not be more different, what is the secret?"
The guide says simply, "They have learned to reach across the table, and feed each other."
Most people focus on the positive aspect of this story: we can all live in heaven if we learn to help each other. However, the corollary is equally important: being selfish and immoral leads to a world of hurt, for yourself and everyone in your life.
The sutras are full of lurid descriptions of the penalties for immoral behavior, many of them having to do with rebirth into hell realms or as a hungary ghost. In my personal experience no such punishment is necessary, karma works more quickly than that, and those things which I regret are clearly incised on my conscience. The Dhammapada, which contains the canonical moral code for Buddhists, makes the case that the suffering from misdeeds need not wait for the next life:
DHP 314. Better to do nothing than to do what it wrong, for wrongdoing brings burning sorrow. Do therefore what is right, for good deeds never bring pain.
In order to prevent this needless suffering we have the Eightfold Path and the Ten Essential Precepts to guide us. Together these are the core of Slia, or good conduct, in Buddhism. Following the path and keeping the precepts is essential to good practice because sitting in meditation is difficult when your mind is plagued by regret and remorse.
Not everything on the Eightfold path relates to morality but the first two steps include having a 'Right Understanding' of the moral law of karma along with the 'Right Intention' to rid ourselves of the ancient, twisted karma we have accumulated in our lives. Moving along the path the next three stops are are very much related to moral development: 'Right Speech', 'Right Action' and 'Right Livelihood' are all fundamental tenants to a moral life, the rest of the path is dedicated to concentration and mindfulness, but before any real progress can be made in that regard you'll want a clean conscience.
The details of what makes right speech, action and livelihood are outlined in the precepts, which I'll cover in another post. Right now I have to get packed for my first sesshin.