The same definition of flatness holds for connections in various algebraic setups and for connections on quasicoherent sheaves.
The condition of flatness is usually expressed via the Maurer-Cartan equation. Flat connections on bundles are also referred to as local systems (by the Riemann-Hilbert correspondence discussed below).
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.
In (Milnor) it is shown that a vector bundle over a surface of genus admits flat connections iff its Euler class is less than by an absolute value (see also Wood, Bundles with totally disconnected structure group). Sullivan gives a refinement.
Maurer-Cartan equation is called also structure equation when used to treat the conditions for isometric embeddings of Riemannian submanifolds in an Euclidean space.
John Milnor, On the existence of a connection with curvature zero, Comm. Math. Helv. v 32
Dennis Sullivan, A generalization of Milnor’s inequality Comm. Math. Helv. v. 51