Why are people interested in Cohen-Macaulay of codimension 2?  In deformation theory, Cohen-Macaulay in codimension 2 is the first to be considered in higher order deformation. Does Cohen-Macaulay in codim. 2 have some good property to work with? Does it somehow measure how singular a scheme is?
I am reading Hartshorne's deformation theory, and I have difficulty to "see" why Cohen-Macaulay in codim. 2 is a good object to work with.
Thank you very much
 A: Angelo has already mentioned the Hilbert-Burch theorem in a comment. 
One could present its importance this way: The ideal of a codimension $1$ subscheme in a regular affine scheme is locally free of rank $1$, so everything is pretty easy in this case. 
The next case is codimension $2$. Here things can get hairy, but the Hilbert-Burch theorem says that if the subscheme is Cohen-Macaulay its deformation theory is still nice.
To answer your other questions:


*

*Cohen-Macaulay has good properties regardless of the codimension (see below).

*Yes, it measures how singular the scheme is and it says that in some sense it is not too badly singular. Local complete intersections are Cohen-Macaulay and although Cohen-Macaulay is not necessarily local complete intersection, many things that work for l.c.i.'s work for CM as well.
So, why is CM a good property:
A practical reason is that CM is absolutely immune to passing to or from hyperplane sections, so in general using induction is relatively robust.
A less obvious but extremely useful property CM schemes have is that their dualizing complex is supported at only one place, in other words they admit a dulaizing sheaf. This means that duality theory is much simpler for CM schemes. 
There are many properties that families of CM schemes satisfy that are not true in general. Most of these actually stem from the two properties I mentioned above.
A more sophisticated version of the CM property is Serre's condition $S_n$. This requires less, in some sense it requires that the scheme is CM "up to some degree". 
The property $S_2$ appears as a necessary condition for a scheme to be normal (the other is being regular in codimension $1$). Property $S_2$ is also important as it is the algebraic version of the Hartog property, namely that regular functions be determined by their codimension $1$ behaviour. For more on $S_2$ see this MO question.
