Technically, colonial laws did not legalize sexual assault on black or, to be more precise, enslaved black women. Like other violent offenses, sexual assault and rape was illegal regardless of the victim. But historians find very few cases in which men were prosecuted for rape, whether of white or black women. This does not mean that the crime did not occur, but simply that there were reasons why it was not prosecuted. Women did not feel comfortable reporting the crime, and the male-controlled courts did not think it important enough to pursue prosecution. Given the unequal social status of African American women, it is likely that sexual assault was rampant in colonial America.
Colonial law encouraged sexual assault of enslaved women in another way. During the seventeenth and early eighteenth centuries, colonies in the Caribbean and every colony with a large enslaved population passed laws that made slavery hereditary. Along with these laws, they passed legislation that determined the status of an enslaved person based on their mother's status. So, in short, a child born to an enslaved woman would be enslaved, and a child born to a free woman would be free. This meant that slave owners and their sons could engage in sexual activity with enslaved women without worrying about the condition of any children that would result from sexual activity. (Having a child out of wedlock with a white woman usually resulted in a fine, and the father among others had to post a bond for the care of the child.) So in this sense, the radicalized, hereditary nature of slavery as it developed in the colonies basically indemnified white men for the sexual assault of enslaved women. It is very difficult to measure empirically, but written sources suggest that sexual activity between whites and the enslaved was rampant, and given the inequalities in power relations, it is impossible to categorize these interactions as anything other than sexual assault. While there is no evidence that whites engaged in sexual assault with enslaved women to produce slaves for sale, it is well-known by historians of slavery that children of mixed ancestry were sold as enslaved prostitutes in some cities, and tended to be valued as house servants on large plantations throughout the South. More generally, as the cotton economy expanded in the early nineteenth century, and the demand for slaves increased, slave owners had a financial interest in their slaves' natural increase.