You don’t know for absolutely positively sure. However, it is the hypothesis best supported by the evidence. For one thing, things in real life can be replicated and independently verified. This is not possible for things in dream life.
It’s really pretty simple. Once you understand the scientific method, it will be obvious.
Now, having said that, I will admit that it is a fun proposition to consider. It makes you take a second look at life and perception. It makes you question your perceptions. In fact, we are right to do that. Many times our perceptions give us very inaccurate information. This is probably true in dreams as it is in real life. To the extent we really don’t “see” what is out there, our dreams could be as accurate as our waking perceptions. But I doubt it. Except for me, lol.