We have medical marijuana in California, and like luareth said, even though it is legal in the state, it is not legal under federal law. Having said that, though, I have never heard of anyone being charged and prosecuted by the Feds for medical marijuanna.
There are some glitches, while t is legal if recommended by your doctor, it is not legal to purchase it r sell it. They do have ‘marijuanna clubs’ that are set up to sell it, but most of those are currently being closed down by the state and feds The main way they tend to nail them has to do with sloppy bookkeeping when it comes to paying the taxes involved.
It is legal to grow it yourself if you have a doctor recommendation. The rules for growing vary from county to county. In general, you shouldn’t grow more than what you might reasonably use for your condition.