Can PVC pipe be exposed to the sun?
PVC does not readily degrade when exposed to sunlight (ultraviolet radiation) due to natural UV inhibitors present in the material. Short-term exposure to sunlight, such as during construction, is typically not a problem for PVC pipe. PVC piping may be used in outodoor applications when the piping system is painted with a light-colored water based acrylic or latex paint that is chemically compatible with PVC. When painted, the effects of UV exposure are significantly reduced.
http://www.ppfahome.org/pvc/faqpvc.html
Does long term exposure to sunlight degrade exposed PVC pipes?
PVC pipe contains stabilizers to protect the pipe against attack by UV present in sunlight. After several months of outdoor exposure a discoloration may appear on the surface of the pipe, however, the performance of the pipe is not affected. After two years of exposure, there is only a slight reduction in the impact resistance of the material. PVC pipe used in permanent outdoor exposures should be protected by a light colored compatible water based paint. Do not use oil based paints.