I went through Prof. Hitoshi Murayama's online lecture where he describes why the universe is flat. One of the evidences for a flat universe is the evenness of CMB radiation on all directions. My understanding is, that a uniform CMB pattern only indicates that inflation or early expansion of the universe was more or less equal on all directions. Why is this cited for the claim that the universe is flat, or in what sense is the universe 'flat'?
The CMB lets us measure how close to flat the universe is right now.
On the other hand, inflation tries to explain how we got from whatever the early universe was to right now.
The motivation for the latter being that even extremely small deviations from perfect flatness in the early universe should have resulted in very obvious deviations from flatness today. That we don't see obvious deviations then suggests the universe was amazingly close to perfectly flat early on, and such perfect tuning seems bizarre. Inflation basically lets a (in some sense "very") non-flat early universe get flattened to this precision, thereby resolving the "problem" of having an almost perfectly flat early universe. It takes the situation from an extremely narrow range of initial conditions for the flatness of the universe and gives us a broad range of equally valid possibilities, instead.
Inflation is also commonly used to explain the remarkable homogeneity of the CMB, which suggests that parts of the universe that cannot ever have received light speed signals from each nevertheless achieved thermal equilibrium (an at-most light speed process). Inflation throws in a super-luminal expansion to allow these regions to be within light speed communications of each other in the very early universe, with just enough time to achieve thermal equilibrium, and then inflates them beyond light speed communication.