The context of this line is the conversation between Hamlet and Rosencrantz and Guildenstern. Rosencrantz and Guildenstern were sent by Claudius to spy on Hamlet. Hamlet, being the intelligent wit that he is, knows they are spying. Hamlet plays with Rosencrantz and Guildenstern. Scholars (and directors) seem to disagree with how this line (and in fact entire speech) should be played. Most of the time, this line is spoken as truth and as human nature as the work of God, with the human being truly worthy of praise and admiration. Sometimes, though, this speech is meant to mock Rosencrantz and Guildenstern, with Hamlet using a sarcastic tone to indicate irony. Again, in this way, this line can serve to augment the appearance vs. reality theme. If one takes this particular interpretation, idiots who spy for their superiors (like Rosencrantz and Guildenstern) are certainly not worthy of praise and pieces "of work" created by God, nor are they "infinite in faculties" in that they have both little wit and little intelligence. It is ironic to note that if someone today refers to someone else as a "piece of work," it is generally not meant as a compliment.