Under federal law marijuana is illegal all the time and everywhere. Under some state laws, it is legal for medical reasons. The federal government is merely overlooking the violation under Obama. Since it is a federal violation (aka unlawful use), possession of a firearm under federal law is illegal.
So, we've got a dichotomy between state and federal regulations. Perhaps a bill to make an exception for drugs consumed under medical advice?
Heck, I'd rather shoot with a guy smoking a joint a day for glaucoma than a guy consuming a regular cocktail of Xanax, Percocet and Adderall.
Another option might be a 10th Amendment suit in one of the states with the Firearms Freedom Act. Such states are already considering certain federal gun regulations as infringements on their powers, and this is simply another of those.