The unavoidable issue is that both types of carboys are typically transparent. Ultraviolet radiation can pass right through the clear walls of a carboy and ruin the brew inside.
My solution: put a t-shirt on your carboys. An old undershirt or two can give your brew a more consistent flavor and a longer shelflife.
Here comes the science: ultraviolet radiation has a shorter wavelength than visible light, and its higher energy content allows it to break chemical bonds in all kinds of substances, from beverages to DNA (this is why it gives people sunburns and/or skin cancer). “Skunked” beer is caused by sunlight, and any other source of ultraviolet light will also affect the flavor of any brew, usually for the worse. This why brown bottles are the best for the long-term storage of homebrew: the dark color blocks most of the ultraviolet light from reaching the liquid inside. For this reason, I keep my more transparent glass containers (green, blue, and clear bottles) inside another opaque container, such as a cardboard box. Putting one or more t-shirts over a carboy will reduce the amount of light that reaches the brew inside. A white shirt will reflect the most light. However, a thick shirt of any color will still absorb the light and protect the contents of the carboy.
As for the choice between glass and plastic carboys, there is good reason for the debate between these two options. Glass does not absorb colors or odor and will last indefinitely with proper care, but the glass bottles are heavy and expensive, which increases the cost and risk of dropping one and breaking it. Plastic carboys are lightweight and convenient, not to mention cheaper. Of course, colors and odors may linger in a plastic container, and the plastic will weaken with age and may split easily after over a long period of time. Neither type is a perfect solution for everyone. I use both without preference and have not observed any differences in flavor or consistency between the two bottles.