This can happen when overnight temps are much cooler than the day temps.
It is caused by an accumulation of natural plant pigments (anthocyanins), is somewhat normal and is not a sign of anything going wrong.
It can also be related to genetics.
While it may make the plant look different/special, it does not affect potency, yields or taste/flavour of the plant.