Sigma, Tamron, Tokina and a few other 3rd party lens makers are fully capable of producing lenses which are optically identical to or even superior to the likes of Canon and Nikon. They also make a selection of lenses which the big players don't produce; giving them not only good quality, but also new market areas where they are able to shine.
Generally speaking Canon and Nikon retain the edge just with build quality refinements, but many times for the average user the build quality differences really don't make that much a difference with regard to regular, normal use (esp at the pro end of the 3rd party series).
There are some 3rd party options which even beat their main rivels - the Sigma 50mm f1.4 is a prime example of a lens which fully beats the older design Canon; meanwhile options like the sigma 70-200mm f2.8 OS isn't able to beat the canon 70-200mm f2.8 IS L MII, but commands a lower price in the market.
In the end the best key is to work out the use for the new lens, then see the market options both first and third party; from there you can go on read reviews and try out in shops and the like to compare them against each other; taking into account specifications, costs and features. Be careful of reviews that review a lens on its own and keep mind to the date they are published - a lens that several years ago was "the best you could get" can quickly becomes something that is superseded by better market options.
As for myself, I currently use more 3rd party than own brand - a Sigma 150mm macro, 70mm macro, 8-16mm and a Tokina 35mm macro - all of which are top rate optics and certainly perform very well (and the 3 macros have to compete against the Canon 65mm macro in my bag, so they don't have it easy on the competition side

).