"The show of their countenance doth witness against them, and doth declare their sin to be even as Sodom, and they cannot hide it. Wo unto their souls, for they have rewarded evil unto themselves!
Say unto the righteous that it is well with them; for they shall eat the fruit of their doings.
Wo unto the wicked, for they shall perish; for the reward of their hands shall be upon them!"
2 Nephi 13:9-11
In the Old Testament the city of Sodom was destroyed because of wickedness, after Abraham bargained with the Lord and the Lord agreed to spare it if even 10 righteous people were found in it.
The previous chapter was talking about the Second Coming, so it's likely from that, and from the fact that Nephi is copying Isaiah into the Book of Mormon for us to read, that this is also a prophecy of our day. But we kind of know that already... our society has some great wickedness in it. The thing that gets me here though is the clear message that we are doing all of it to ourselves... when we are evil, we reward evil to ourselves. When we are righteous, then we will be happy getting the "fruit of [our] doings" but that same reward "the reward of [our] hands" is a curse when it is given to the wicked.
I think the message here is that the biggest obstacle that we have, and the scariest thing in our lives, is ourselves. If we do good, then our reward will be good. If we do evil, our reward will be the same.
We get confused with this principle sometimes because we think that it means that if we're good nothing bad will ever happen to us, and so when something bad does happen we can think that either God is wrong (always a mistake), or that we're not being righteous enough. But that's not the way it works. Although of course we are more than capable of screwing up our lives right now, God is talking about actions and patterns, and of course the eventual judgement day. This life is a test and an opportunity. We have to experience good and bad and deal with a bunch of things in order to figure ourselves out and know what we want to be. The reward that it speaks of doesn't happen until the test is over and we stand at the bar of God. And the reason the reward of our actions isn't immediate is because Christ steps in between justice and us, to give us the ability and space to repent.
In Mormon 9:14 it talks about the judgement and it says "he that is filthy shall be filthy still; and he that is righteous shall be righteous still; he that is happy shall be happy still; and he that is unhappy shall be unhappy still." God is letting us learn how to be who we want to be. The things that we do and learn and become here are going to be who we are there, for eternity.
Like Abraham did with Sodom, Christ pleads with God to spare us and give us time to change. Let's listen to his advice, and learn to be better people and who we want to be in eternity. Let's start examining the fruit of our doings and make sure that it is what we want to snack on for eternity... and if it isn't, then let's change, and learn to be the kind of person that we would like to be instead. God will teach us how as we pray and turn to him with faith.