I have heard that people with black skin had been denied certain things in the Mormon Church until the past 30 years or so and that this has something to do with the Curse of Cain. What has been the historical teaching of the LDS Church regarding the Curse of Cain and dark-skinned people? What are the references in the Book of Mormon and other Mormon Scriptures that address this issue?
Here is more context for some verses from the Book of Mormon, the first quote shows the curse, and the effect of it, so they became dark-skinned and lazy. The problem is that this can then be extended to shape prejudices against anyone because of their skin color, but, the last two quotes shows that discrimination based on color is wrong, and all from the Book of Mormon.
21 And he had caused the cursing to come upon them, yea, even a sore cursing, because of their iniquity. For behold, they had hardened their hearts against him, that they had become like unto a flint; wherefore, as they were white, and exceedingly fair and delightsome, that they might not be enticing unto my people the Lord God did cause a skin of blackness to come upon them. 22 And thus saith the Lord God: I will cause that they shall be loathsome unto thy people, save they shall repent of their iniquities. 23 And cursed shall be the seed of him that mixeth with their seed; for they shall be cursed even with the same cursing. And the Lord spake it, and it was done. 24 And because of their cursing which was upon them they did become an idle people, full of mischief and subtlety, and did seek in the wilderness for beasts of prey.
When you come back to God and do what is expected then this curse is lifted:
12 Therefore, all the Lamanites who had become converted unto the Lord did unite with their brethren, the Nephites, and were compelled, for the safety of their lives and their women and their children, to take up arms against those Gadianton robbers, yea, and also to maintain their rights, and the privileges of their church and of their worship, and their freedom and their liberty. 13 And it came to pass that before this thirteenth year had passed away the Nephites were threatened with utter destruction because of this war, which had become exceedingly sore. 14 And it came to pass that those Lamanites who had united with the Nephites were numbered among the Nephites; 15 And their curse was taken from them, and their skin became white like unto the Nephites; 16 And their young men and their daughters became exceedingly fair, and they were numbered among the Nephites, and were called Nephites. And thus ended the thirteenth year.
Another section showing that others may get the curse due to their wickedness:
14 Thus the word of God is fulfilled, for these are the words which he said to Nephi: Behold, the Lamanites have I cursed, and I will set a mark on them that they and their seed may be separated from thee and thy seed, from this time henceforth and forever, except they repent of their wickedness and turn to me that I may have mercy upon them. 15 And again: I will set a mark upon him that mingleth his seed with thy brethren, that they may be cursed also. 16 And again: I will set a mark upon him that fighteth against thee and thy seed. 17 And again, I say he that departeth from thee shall no more be called thy seed; and I will bless thee, and whomsoever shall be called thy seed, henceforth and forever; and these were the promises of the Lord unto Nephi and to his seed. 18 Now the Amlicites knew not that they were fulfilling the words of God when they began to mark themselves in their foreheads; nevertheless they had come out in open rebellion against God; therefore it was expedient that the curse should fall upon them. 19 Now I would that ye should see that they brought upon themselves the curse; and even so doth every man that is cursed bring upon himself his own condemnation.
When you try to be consistent with the BoM then cherry-picking to justify prejudices is going to happen, as God isn't going to discriminate based on skin color for example.
33 For none of these iniquities come of the Lord; for he doeth that which is good among the children of men; and he doeth nothing save it be plain unto the children of men; and he inviteth them all to come unto him and partake of his goodness; and he denieth none that come unto him, black and white, bond and free, male and female; and he remembereth the heathen; and all are alike unto God, both Jew and Gentile.
And here the believers are commanded not to hold these against others since the believers should reflect on the filthiness of their own souls. This is similar to "Him who has no sin cast the first stone", IMO.
7 Behold, their husbands love their wives, and their wives love their husbands; and their husbands and their wives love their children; and their unbelief and their hatred towards you is because of the iniquity of their fathers; wherefore, how much better are you than they, in the sight of your great Creator? 8 O my brethren, I fear that unless ye shall repent of your sins that their skins will be whiter than yours, when ye shall be brought with them before the throne of God. 9 Wherefore, a commandment I give unto you, which is the word of God, that ye revile no more against them because of the darkness of their skins; neither shall ye revile against them because of their filthiness; but ye shall remember your own filthiness, and remember that their filthiness came because of their fathers.
So, it is easy to see how people could pick some verses and make some decisions that enforce their own biases, but that is due to ignoring other verses, so the blame is not on the BoM but on those that did the cherry-picking.
The Mormon "Book of Moses" 7:22 states that (emphasis added):
And Enoch also beheld the residue of the people which were the sons of Adam; and they were a mixture of all the seed of Adam save it was the seed of Cain, for the seed of Cain were black, and had not place among them.
Mormon viewpoint for most of their history was that black people were banned from priesthood and from some other blessings that white people were entitled to. Because of this curse and statements elsewhere in the Book of Mormon (such as 2 Nephi 5:21-23) if a white man married a black woman their children would not qualify for priesthood.
In fact the Utah Territory Slave Code of 1852, signed into law by Brigham Young (President of the LDS Church from 1847 until his death in 1877; Governor of the Utah Territory from 1851 to 1858), said the following about sexual intercourse between a white person and an African person (sec. 4, available here):
and if any white person shall be guilty of sexual intercourse with any of the African race, they shall be subject, on conviction thereof to a fine of not exceeding one thousand dollars nor less than five hundred, to the use of the Territory, and imprisonment, not exceeding three years
(According to Wikipedia, the slavery portion of the act was repealed by Federal law on June 19, 1862 but the portion quoted above remained in effect until 1963.)
It is noteworthy that Brigham Young was the Prophet, Seer and Revelator of the LDS Church during his time as Church President. He is for this reason viewed with reverence by the faithful even today and his opinions on "Negroes" have an effect on the Mormon view of their past race policy.
For example, Brigham Young wrote in a discourse titled "We Must Believe in Slavery" on 23 January 1852 (available e.g. here) as follows (second to the last paragraph):
When a master has a Negro and uses him well, he is much better off than if he was free. As for masters knocking them down and whipping them and breaking the limbs of their servants, I have as little opinion of that as any person can have; but good wholesome servitude, I know there is nothing better than that.
Regarding interracial relationships, Brigham Young wrote in the Journal of Discourses, vol. 10, p. 110 in 1863 that:
"Shall I tell you the law of God in regard to the African race? If the white man who belongs to the chosen seed mixes his blood with the seed of Cain, the penalty, under the law of God, is death on the spot. This will always be so."
Closer to our modern era it seems that the Mormon church had implemented a "one drop rule" to determine whether a male was qualified for the priesthood. Rather than having a rule that a drop of white ancestry makes the individual qualified for the priesthood, the policy was that a drop of "negro" ancestry makes the individual disqualified.
Regarding this the Mormon Apostle Mark E Petersen gave a lecture on on August 27th, 1954, titled "Race Problems As They Affect The Church" in which he stated that:
If I were to marry a Negro woman and have children by her, my children would all be cursed as to the priesthood. Do I want my children cursed as to the priesthood? If there is one drop of Negro blood in my children, as I have read to you, they receive the curse.
(Above text is from the last page of the lecture available here at archive.org)
This same sentiment can be seen in a letter, dated April 16, 1964, from the First Presidency to a Bishop in Idaho (the letter is available here).
The letter addresses the concern that a sister who had two boys approaching priesthood age may have had some "negro blood":
We have read with interest your letter of April 6th in which you refer to a certain family in your ward about whom there has been some discussion as to whether or not they have negro blood. You indicate that there are two boys who are approaching priesthood age and that it has been rumored that the mother has negro blood, although there are few, if any, visible signs thereof. You also tell us that according to this sister's statement her case has been investigated on previous occasions and no evidence has to date been disclosed that would indicate that she has negro blood. We note your quotation from a patriarchal blessing given to this sister, [name withheld], in which the patriarch states that she is "of the daughters of Israel through the loins of Ephraim," and declares this to be her lineage.
Inasmuch as there is no conclusive evidence that these people have negro blood it would seem that you would not be justified in denying the boys the privilege of being ordained in the priesthood in the event they are otherwise worthy. We do not feel that the burden of proof rests upon this sister and her family.
It seems that if there had been "conclusive" evidence that the mother had "negro blood", her boys would have been denied the priesthood rights on that basis.
The document "THE RECEIPT OF THE REVELATION OFFERING THE PRIESTHOOD TO MEN OF ALL RACES AND COLORS" by Bruce R. McConkie (available here), dated June 30th, 1978, discusses (in par. 1) the problems this policy led to when the LDS Church opened a temple in Brazil:
There have been discussions for instance, about patriarchal blessings for Negroes and about the problems we might encounter in Brazil after the dedication of the Sao Paulo Temple. As a matter of historical fact, many of the early settlers in Brazil were Portuguese and African Negroes. There was extensive intermarriage. It is generally felt that an appreciable part of the Brazilian nation is now composed of people who have some degree or other of Negro blood in their veins. Many of these have no facial or other physical characteristics to indicate in any way that they have Negro ancestry. Many of our Church congregations, particularly in Northern Brazil, have in them full and part blood Negroes. The social problems existing in the United States are not found in Brazil to any appreciable degree and so this intermixture of races has not caused problems except with reference to priesthood ordinations and the prospects of temple blessings.
In light of above, it seems that both the expansion in Brazil and the public opinion against the church here in USA were factors that led the policy to be abandoned.
The problem for the Mormon church however is that it is difficult for them to explain the reasons for the policy without making either their past leadership or their God look racist.
About this, The New York Times article "Why Race Is Still a Problem for Mormons", dated August 18, 2012, states (in par. 10) that
while Mormon leaders generically criticize past and present racism, they carefully avoid any specific criticism of past presidents and apostles, careful not to disrupt traditional reverence for the church’s prophets.
Consequently it looks like the approach that was adopted was to not to try to explain the past stance at all.
This may be why the Mormon Elder Holland said, when asked in an interview with PBS about the "folklore" banning blacks from the priesthood, as follows (emphasis added):
One clear-cut position is that the folklore must never be perpetuated. ... I have to concede to my earlier colleagues. ... They, I'm sure, in their own way, were doing the best they knew to give shape to [the policy], to give context for it, to give even history to it. All I can say is however well intended the explanations were, I think almost all of them were inadequate and/or wrong. ...
It probably would have been advantageous to say nothing, to say we just don't know, and, [as] with many religious matters, whatever was being done was done on the basis of faith at that time. But some explanations were given and had been given for a lot of years. ... At the very least, there should be no effort to perpetuate those efforts to explain why that doctrine existed. I think, to the extent that I know anything about it, as one of the newer and younger ones to come along, ... we simply do not know why that practice, that policy, that doctrine was in place.