2 fixed inaccuracies.

The Ricci curvature is a local quantity, so I am only going to focus on the case that the local holonomy group is SO(n). Philosophically, the local holonomy group and the curvature of a connection attempt to measure the same thing. On the one hand, the curvature is the infinitesimal comparison of parallel transporting in two directions in differing orders. The heuristic picture is just an infinitesimal parallelogram. The local holonomy, on the other hand, measures the actual change along null-homotopic paths. Thus it is not too surprising that these two invariants are closely related.

One reflection of this is captured by the Ambrose-Singer holonomy theorem. Roughly this theorem says that the lie algebra of the (local) holonomy group must be large enough to accomodate all the parallel translates of the curvature tensor evaluated on all 2-planes at a given point. In fact the lie algebra of the holonomy group consists of precisely these translates (for each loop and each 2-plane we get an endomorphism of $T_xM$).

On the other hand, the curvature of a torsion free connection (such as the Levi-Civita connection) must satisfy the first and second Bianchi identities. This can also be related to the holonomy group and the space of tensors which satisfy these conditions becomes smaller and smaller as the Lie group becomes larger.

Berger's classification theorem works by playing these two opposing forces off each other. The holonomy group must at the same time be both small and large and only certain groups satisfy both requirements. I'm fairly certain that local SO(n) holonomy is incompatible with being Ricci flat. Edit: This guess was wrong. See Igor's answer for a counterexample.

1

The Ricci curvature is a local quantity, so I am only going to focus on the case that the local holonomy group is SO(n). Philosophically, the local holonomy group and the curvature of a connection attempt to measure the same thing. On the one hand, the curvature is the infinitesimal comparison of parallel transporting in two directions in differing orders. The heuristic picture is just an infinitesimal parallelogram. The local holonomy, on the other hand, measures the actual change along null-homotopic paths. Thus it is not too surprising that these two invariants are closely related.

One reflection of this is captured by the Ambrose-Singer holonomy theorem. Roughly this theorem says that the lie algebra of the (local) holonomy group must be large enough to accomodate all the parallel translates of the curvature tensor evaluated on all 2-planes at a given point. In fact the lie algebra of the holonomy group consists of precisely these translates (for each loop and each 2-plane we get an endomorphism of $T_xM$).

On the other hand, the curvature of a torsion free connection (such as the Levi-Civita connection) must satisfy the first and second Bianchi identities. This can also be related to the holonomy group and the space of tensors which satisfy these conditions becomes smaller and smaller as the Lie group becomes larger.

Berger's classification theorem works by playing these two opposing forces off each other. The holonomy group must at the same time be both small and large and only certain groups satisfy both requirements. I'm fairly certain that local SO(n) holonomy is incompatible with being Ricci flat.