The answer is that there is no clear cut answer. While some that use medical marijuana are likely fantastic parents and use so that they can continue to parent effectively, there are always those that abuse the system, like with any other drug. The problem that comes to play in this issue is that even though medicinal use of marijuana is legal in 20 states and the District of Columbia, the federal Drug Enforcement Administration classifies the drug as a Schedule I substance with "no currently accepted medical use in the United States" and high potential for abuse. This means that for judges, people that work in child protective services, and police, they have been fighting the war against marijuana for so long, they simply do what they always have done. Even if you can prove that you have a card that says you can use, or you take every precaution to ensure that your children don't come in contact with it, it's still going to be seen as a problem because CPS doesn't distinguish marijuana from any other schedule I drug such as heroine or ecstasy.
To even further complicate the situation, recreational marijuana use is now legal in Washington and Colorado. What sort of impact that will have on children in those states is yet to be seen. Marijuana use has also been approved for use by children that suffer from some forms of epilepsy and other seizure disorders as well as extreme cases of autism.
There are so many legal substance on the market that have a much higher potential of making a person into a bad parent, but if CPS or a police officer were to come to your home, they would likely be overlooked. There really is no right or wrong answer in this, it's all a matter of how it's perceived.