As we have noted all men will be brought forth from the grave, and will be judged "according to their works." The following passages from the Book of Mormon will further enlighten us regarding the Resurrection and the Day of Judgment:
And I said unto them that our father also saw that the justice of God did also divide the wicked from the righteous; and the brightness thereof was like unto the brightness of a flaming fire, which ascendeth up unto God forever and ever, and hath no end,
And they said unto me: Doth this thing mean the torment of the body in the days of probation, or doth it mean the final state of the soul after the death of the temporal body, or doth it speak of the things which are temporal?
And it came to pass that I said unto them that it was a representation of things both temporal and spiritual; for the day should come that they must be judged of their works, yea, even the works which were done by the temporal body in their days of probation.
Wherefore, if they should die in their wickedness they must be cast off also, as to the things which are spiritual, which are pertaining to righteousness; wherefore, they must be brought to stand before God, to be judged of their works; and if their works have been filthiness they must needs be filthy; and if they be filthy it must needs be that they cannot dwell in the kingdom of God; if so, the kingdom of God must be filthy also.
But behold, I say unto you, the kingdom of God is not filthy, and there cannot any unclean thing enter into the kingdom of God; wherefore there must needs be a place of filthiness prepared for that which is filthy.
And there is a place prepared, yea, even that awful hell of which I have spoken, and the devil is the foundation of it; wherefore the final state of the souls of men is to dwell in the kingdom of God, or to be cast out because of that justice of which I have spoken.
Wherefore, the wicked are rejected from the righteous, and also from that tree of life, whose fruit is most precious and most desirable above all other fruits; yea, and it is the greatest of all the gifts of God. And thus I spake unto my brethren. Amen. (1 Ne. 15:30-36)
And he doth not dwell in unholy temples; neither can filthiness or anything which is unclean be received into the kingdom of God; therefore I say unto you the time shall come, yea, and it shall be at the last day, that he who is filthy shall remain in his filthiness. (Alma 7:21)
And because of the redemption of man, which came by Jesus Christ, they are brought back into the presence of the Lord; yea, this is wherein all men are redeemed, because the death of Christ bringeth to pass the resurrection, which bringeth to pass a redemption from an endless sleep, from which sleep all men shall be awakened by the power of God when the trump shall sound; and they shall come forth, both small and great, and all shall stand before his bar, being redeemed and loosed from this eternal band of death, which death is temporal death. And then cometh the judgment of the Holy One upon them; and then cometh the time that 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. (Mormon 7: 13-14)