Excessive accumulation of anthocyanin causes the stems of pepper plants to turn black. When pepper plants are stressed, their anthocyanin levels rise as a defense mechanism while giving a black color to their stems.