To "pick something to pieces" means to criticize all aspects of something. "To pick" means to select. The joke is centered on the word pick and how it can be used to describe selecting something, or to criticize something.
Pick your friends , but not to pieces