What is the difference between Principal G bundles v.s. Flat G connection?
I heard that for a discrete group $G$ (in physics, or a finite group $G$ in math), the principal G bundles is the same as the flat G connection.
I know the definitions, but I wish to know explicit cases where I can see their differences. Like this MO post.
For a topological group $G$ and a path-connected base space $X$, a principal $G$-bundle is classified by a map $X \to BG$ where $BG$ is the classifying space, whereas a principal $G$-bundle with flat connection (which presumably is what you meant to ask about) is classified by a map $\pi_1(X) \to G$ (its monodromy), or equivalently by a map $X \to BG_{\delta}$, where $G_{\delta}$ is $G$ equipped with the discrete topology.
The two spaces above are the same when $G$ is discrete but different in general. For example,
$$\pi_1(BG_{\delta}) \cong G$$
while
$$\pi_1(BG) \cong \pi_0(G).$$
So already on a circle the classifications of principal $G$-bundles vs. principal $G$-bundles with flat connection are very different, and the difference persists for higher-dimensional spheres: $BG_{\delta}$ has no higher homotopy, but the higher homotopy groups of $BG$ are the higher homotopy groups of $G$ shifted down one index.
If your question was on a more basic level than this, the point is that a connection is extra structure you can put on a principal bundle that equips it with a notion of parallel transport, and flatness is an extra property guaranteeing that parallel transport only depends on the homotopy class of the path. Without a connection you don't even get a notion of parallel transport.