Vitamin B12 is a crucial vitamin required by body for normal functioning. There is some evidence that suggest that deficiency of B vitamin during pregnancy increases risk of neural tube defect in foetus.
This happens when baby's nerves and spinal cord does not develop properly in initial weeks of pregnancy. It can results in spina bifida (spine does not close properly) or anencephaly (brain and skull does not close properly).
A pregnant woman needs 2.6 mcg vitamin B per day and a breast feeding woman needs 2.8 mcg vitamin B per day.
How to prevent Vitamin B deficiency in pregnancy:
Have well balanced diet.
If pregnant mother is non-vegetarian then she can easily get this vitamin from animal products like meat, fish, eggs etc. But for vegetarians oral supplements should be taken as per advice from professional.