Both have great movies and a few flops, but I basically enjoy 10 films from each of them, and Dreamworks has significantly more releases overall so that means they have more flops as well.
Pixar's catalog is more consistent overall (though that looks to be changing).
Dreamworks has a few great films (Shrek, How To Drain Your Dragon, Antz, Over The Hedge, etc.). They have an awful tendency to milk their series to the ground... Shrek, Madagascar, Kung Fu Panda, etc. Pixar is starting to do that (Toy Story 4, for instance). But, overall Pixar's films just have a better charm to them if you look at their entire catalog.