It's more to do with the chance of falling not the riding it's self.
I think its like most things with pregnancy do at your own risk kind of thing. If your bot mountain biking uou should be ok lol. I am sure a stroll around the block with your son is not going to hurt anything.
Your sense of balance can be off because of the extra weight and it can be awkward if your thighs touch your belly while you are pedaling. If you're used to biking it should be fine. But if you only bike occasionally or aren't that great at it you should really use caution.
Your sense of balance and the fall risk. Even a hard bump could hurt you.
I cycle but have stopped during pregnancy.
Several months before my pregnancy I accidentally clipped a curb on my road bike and went A## over the handle bars. I was ok but very bruised. I had a helmet and camel back to help cushion the impact. Had I been pregnant I can only think the worst would have happened. I hadn't spilled in years but it really only takes one fall.
I casually cruised around on my bike until I was 32 weeks. I only stopped because my thighs started hitting my belly at that point. I took extreme caution when riding though. I was ultra careful. Biking made me feel really good and active, so go ahead sweetheart... enjoy yourself if you can control yourself! :)