How harmful is "occasional" marijuana smoke during pregnancy? How does it affect the baby?
That is a tough question to answer with accuracy. The harm that any drug can do to an unborn baby (I'm assuming that is what you mean) depends upon the circumstances: how much of the drug you use, when during the pregnancy you smoke, etc.
I could not find any direct studies on marijuana in pregnancy, so I looked into what is known about the drug Marinol. Marinol contains the same active ingredient as that in marijuana and is used as an appetite stimulant in some cancer and AIDS patients.
We do know that the active ingredient (THC) concentrates in human milk and that there can be dangerous interactions between THC and other drugs when taken at the same time.
So, it is a 'draw your own conclusions' situation to some extent, but is it really a chance worth taking?