Although, then again, there's the problem of grandchildren of smokers getting cancer, when never having been exposed to the smoking first or second hand, only genetically through their parents.
I don't think the person you are replying to meant that sunlight exposure unconditionally causes cancer, and was simply addressing radiation scare and putting it in context.
A moderate amount of sunlight on skin, without burning, is actually healthy for you, unless you 1) have various illnesses (lupus, for one), or 2) are genetically predisposed to skin cancer.
[0] http://www.webmd.com/melanoma-skin-cancer/news/20140530/5-or...
We are told that mostly UV and electromagnetic radiation reach the earth and Sunlight is danger of skin cancer. Have we all read the peer reviewed studies and do we really know how often the sun potential sends a surge of Gamma radiation through your body? Isn't a great concern of long term solar system exploration about astronauts getting all sorts of cancer? How sure are we that the earth's atmosphere is protecting us from the same gamma radiation and that it isn't causing more than just skin cancer? Science evolves and surprises often occur. I personally am not so convinced that the Sun couldn't cause much more dangerous types of radiation myself but, I admit this isn't an area of research for me.