You are talking post-operatively right?
I don't know about UV light altering skin pigmentation, this is not something I have heard or read about. Neither was this mentioned as a caution by my surgeon.
However, I know that external scar tissue and any UV light, either by the sun or sun beds don't get on. UV light can make scar tissue look more prominent, so yet, it's best to avoid sun beds and direct UV light by the sun for a few months.