There are two separate issues here, which need to be distinguished: one is whether the universe is spatially curved and the other is whether spacetime is flat or curved.
The answers to these questions are different: in any sane cosmological model spacetime is curved. But the universe may also be spatially flat (and it seems that it is very close to spatially flat).
The Robertson-Walker metric
If you assume that the cosmological principle is true – that the universe is, on large scales, homogeneous and isotropic – then the most general metric you can come up with for the universe as a whole is the Robertson-Walker metric:
$$ds^2 = dt^2 - \frac{R^2(t)}{c^2}\left(\frac{dr^2}{1-kr^2} + r^2d\theta^2 + r^2\sin^2\theta d\phi^2\right)$$
In this metric
- $t$ is the time coordinate;
- $R(t)$ is a scale factor (with dimensions of length);
- $r,\theta,\phi$ are 'reduced' spherical polar coordinates, which are all dimensionless (the length dimension is absorbed into $R$);
- $k$ is a dimensionless constant and $k \in \{-1,0,1\}$.
There are other ways of representing this metric, quite often you will see it in terms of a dimensionless scale factor $a$ instead of my $R$, when $r$ has dimensions of length and $k$ has dimensions of $l^{-2}$.
This metric doesn't have any real physics in it: it's just the most general metric you can come up with that satisfies the cosmological principle. Note, for instance, that if you make $k=0$ and $R$ constant, you get back Minkowski space: that's how general it is.
But note couple of things: Firstly if $\dot{R} \ne 0$ then this metric doesn't describe a flat spacetime. I'm not going to calculate the Ricci tensor for it, but Wikipedia does and you can see that in general the curvature is not zero.
Secondly you can consider 'slices' of this thing for a given $t$, or equivalently a given $R(t)$: you can think about slices though the universe at a given scale factor, in other words. And you can look at the metric of these 3-dimensional slices, which is, at some time $t_0$, and dropping the $1/c^2$:
$$R(t_0)\left(\frac{dr^2}{1-kr^2} + r^2d\theta^2 + r^2\sin^2\theta d\phi^2\right)$$
Now you can compute the 3-dimensional curvature of these slices. And what you find is that it depends on $k$:
- $k=1$ gives you a spherical curvature;
- $k=0$ gives you a flat space;
- $k=-1$ gives you hyperbolic space.
Note again, this is the curvature of the spatial sections through the universe, not the spacetime curvature.
So the next question is: can you try and work out what $k$ might be for the universe?
Adding physics
To say anything useful about this you need to plug in some physics, in the form of the field equations of General Relativity. I'm not going to go that here, but have a look at the Friedmann equations which is what you end up with. There are two of these, and the first one is the interesting one here. First of all define the Hubble parameter
$$H(t) = \frac{\dot{R}(t)}{R(t)}$$
And now we can write the first Friedmann equation as:
$$H^2(t) = \frac{8\pi G}{3}\rho(t) - \frac{kc^2}{R^2} + \frac{\Lambda c^2}{3}\tag{*}$$
Here
- $\rho(t)$ is the density of the universe;
- $\Lambda$ is the cosmological constant.
For the moment assume $\Lambda = 0$. We can reorganise this in terms of $\rho(t)$:
$$\rho(t) = \frac{3}{8\pi G}\left[H^2(t) + \frac{k c^2}{R^2}\right]$$
But $k \in \{-1,0,1\}$, so there are three possibilities here:
$$\rho(t) =
\begin{cases}
\frac{3}{8\pi G}\left[H^2(t) - \frac{c^2}{R^2}\right]
&k = -1\\
\frac{3}{8\pi G}H^2(t)
&k = 0\\
\frac{3}{8\pi G}\left[H^2(t) + \frac{c^2}{R^2}\right]
&k = 1
\end{cases}$$
So, in particular what falls out of this is that there's a critical value for $\rho$. If we call $H(t_0) = H_0$ then
$$\rho_\text{crit} = \frac{3 H_0^2}{8\pi G}$$
I'm not an experimentalist and I get confused about what people can measure. However the point here is that there is a critical density at which the universe is spatially flat. And I believe that, when you go out and measure things, you find that it's extremely close to that density.
$\Lambda$
One important thing is that, after (*) above I just said let's assume $\Lambda = 0$. What this means is that you don't need a cosmological constant for a spatially-flat universe. $\Lambda$ changes things a little, and it changes the future evolution of the universe (for which you need the other Friedman equation) in such a way that some $k=1$ universes continue expanding for ever, but you don't need it for spatial flatness.
Conclusion
The three conclusions are.
- Spacetime curvature and spatial curvature are different things, and when cosmologists talk about a 'flat' universe they are usually talking about spatial curvature.
- No plausible universe has zero spacetime curvature.
- It is quite plausible to have zero spatial curvature however.
- You do not need a cosmological constant for a spatially flat universe.
Disclaimer
I've bodged this answer together from slightly fading memory and looking a couple of things up which inevitably use different sign conventions etc. I may have made some mistakes. The underlying points are, I think, correct however.