Not necessarily; see radiation hormesis [1]. Small amounts can be beneficial even if large amounts are harmful.
We also know there's a link between more sunlight and less incidence of other types of cancer. It's still unknown whether this is mediated by Vitamin D or other mechanisms.