Glass carboys are very impermeable to oxygen, meaning that your beer will stay fresh even after a long secondary fermentation. They are also fairly easy to clean, and will not scratch easily like a plastic carboy or bucket. The necks are the perfect size to accept a blowoff hose for vigorous primary fermentations, but can be slightly narrower than desirable for additions like dry hops. Glass carboys can also be heavy to handle and carry around (a carboy handle can be added to the neck, but you still have to support it from the bottom). Glass carboys are fairly sturdy, but can be dangerous if they are dropped and break.
Plastic PET carboys are much lighter and easier to handle than their glass counterparts. The necks are larger, so dumping trub and sediment out of your fermentor when cleaning can be a bit easier; this also makes it a little easier for dry hopping and oak additions. They can be fitted with a number of attachments specifically designed for them, made out of a similar excellent quality food grade PET plastic.
They can be used for racking through a ported bottom, use a special water-free airlock, blowoff tubes, etc. More care is needed when cleaning them to avoid scratching the interior, and care must be taken when moving them so that the flexing of the plastic doesn’t draw in water from the airlock. Additionally, they should not be soaked in cleaning solution for more than a few hours.