This is a much-debated question by critics! Lots of profitable time has been lost in my opinion by arguing about whether Lady Macbeth actually had any children, how many, and what happened to them. However, such questions seem to miss the point of what Lady Macbeth is doing here. Note that in this scene, her purpose is to persuade Macbeth and convince him, in spite of his doubts, to kill Duncan and commit the crime of regicide so he can seize the crown and become King of Scotland.
In this context then, Lady Macbeth uses the imagery about her baby to try and shame Macbeth into killing Duncan:
I have given suck, and know
How tender 'tis to love the babe that milks me:
I would, while it was smiling in my face,
Have pluck'd my nipple from his boneless gums,
And dash'd the brains out, had I so sworn
As you have done to this.
Let us note what Lady Macbeth is trying to do here. Macbeth has made the promise to kill Duncan and now he is backing off out of fear or lack of courage. Lady Macbeth is saying that had she so sworn to commit such a crime, she would have done that which was most horrible and alien to her feelings, rather than break the oath. To emphasise the point she uses an act that would have been most horrible and shocking to her feelings - the murder of her child whilst it was at her breast - to underline the solemnity of the promise that Macbeth made.