Verse 15 notes that the Lamanites’ “skin became white like unto the Nephites.” This creates the antithesis of God causing “a skin of blackness to come upon [the Lamanites]” (2 Nephi 5:21). The contrast between white and black is intentional, and should not be confused with skin pigmentation (see the comments on 2 Nephi 5:20–21).
Note the timing of this change. In verse 12, we have previously converted Lamanites. They were converted by Nephi, son of Helaman, well over a decade before. They had not only been righteous, but they were so righteous that they could send a prophet, Samuel, to preach to the Nephites. They do not become “white” until they “did unite with their brethren, the Nephites.” Thus, it appears that “whiteness” is associated with being politically Nephite. The Lamanites and Nephites united against a common foe. The Lamanites are still considered righteous, and Mormon told us in verse 10 of this chapter that the Nephites “did still remain in wickedness.”
The “whiteness” appears only when the Lamanites were “numbered among the Nephites.” The terms are simply further markers of an in-group versus an out-group. There is no relationship here to skin pigmentation.