It is pretty well-established that metformin reduces B12 levels in the longer term (the only downside of the drug apart from err.. the obvious one) -- a doctor at my diabetes clinic told me that she thought B12 tests should be a mandatory part of the annual diabetes review if you have been on metformin for more than 4 years (although she said metformin-induced B12 deficiency is normally treatable just with tablets)
But many other things can cause B12 deficiency -- and I am living proof that they don't just correspond to the lists of causes that you can find on the websites (I had ludicrously low levels and none of the causes pertained to me, unless I had major stomach surgery without noticing). Long-term B12 deficiency can do very unpleasant things, and just to make things more tricky some of these can seem like symptoms of poor diabetic control (e.g. nerve damage, low nerve velocity and loss of sensation). The problem is that once you are diagnosed as diabetic, doctors stop looking for other causes - it took years after my initial diabetes diagnosis for anyone to think to check for B12 deficiency.
But the truly wonderful thing about B12 deficiency is that it can be treated so easily with no side-effects -- if only that were true of diabetes....