Depends on your situation and what/how much you have to compost. Worm farms generally, unless you have a huge one, can only handle a relatively small amount of compostables at a time. And there are lots more limitations on what you can give them, including that it has to be fairly soft and chopped up.
So for that 1-2 cups of good chopped kitchen scraps, definitely prioritize the worms. Worm castings are extremely concentrated goodness for your garden.
For everything else, including the bushels of fall leaves, tons of pulled weeds, yard trimmings, etc etc, use your composter.