What does it mean when you dream that you have a baby?

No one can say. Oh, if only we still had dr. Sigmund freud with us! but since his time, with ideas that dreams are "wish fulfillment" fantasies, the best guess is that dreams are what we experience as our brains go about consolidating and organizing our recent experiences. You may have thought of having a baby recently or know or heard of someone expecting or having had a baby, and so on. A good dream!
Your desire to have1. Dreams are often manifestations of one's own desires. If you have been thinking of having a baby, sometimes dreams may be a depiction of your subconscious mind. Keep in mind, not all dreams are representations of your subconscious, and it may just be a dream with no underlying connection.