The same definition of flatness holds for connections in various algebraic setups and for connections on quasicoherent sheaves.
In geometry one says instead of flat connection, integrable connection. The reason is roughly the following: in the theory of systems of differential equations the flatness of the corresponding connection is the condition of the integrability of the system.
(…elaborate on this with equations)
The condition of flatness is usually expressed via the Maurer-Cartan equation, which is in integrable systems theory often called zero curvature equation. For example, the Lax equations can always be written in the form of the zero curvature equation.
Maurer-Cartan equation is called also structure equation when used to treat the conditions for isometric embeddings of Riemannian submanifolds in an Euclidean space.