Can Metformin cause severe pain in calf and hamstring muscles?

Yes. It is not common for metformin to cause muscle pain but it is a reported side effect of the medication. It would be unusual for it to cause muscle pain in just one group of muscles. Usually when a medication causes muscle pain it occurs in all muscles all over the body.
Cramping/ metformin. Are you on any other medications like statins? Call your doctor immediately, check CPK and lactate levels. Check you glucose level and hold your next dose util this is discussed with your doctor- TODAY ASAP, if glucose high go to ER for treatment. http://www.rxlist.com/glucophage-drug/side-effects-interactions.htm.