Some plastics like acrylics hold up to sunlight very well but most don't. There are stabilizing additives which usually help. A good manufacturer will do accelerated weathering experiments on his product before he sells it but many don't.
There are also plastics designed to rapidly degrade in sunlight. The plastic rings that hold a 6 pack of beer or soda together are an example. Keeps from littering the landscape with them.