The cocycle category H(X; Y) is defined for objects X and Y in a model category, and it is shown that the set of homotopy category morphisms [X, Y] is isomorphic to the set of path components of H(X; Y ), provided that the ambient model category s is right proper, and if weak equivalences are closed under finite products. Various applications of this result are displayed, including the homotopy classification of torsors, abelian sheaf cohomology groups, group extensions and gerbes. The older classification results have simple new proofs involving canonically defined cocycles. Cocycle methods are also used to show that the algebraic K-theory presheaf of spaces is a simplicial stack associated to a suitably defined parabolic groupoid.