States rights is a very messy thing. It comes from the tenth amendment of the constitution which says that all issues not mentioned in the constitution shall be left to the states. However, the Constitution itself has something called "the supremacy clause" which states that the Constitution is the supreme law of the land and that Congressional laws are ranked higher than state laws. This was to make sure that the U.S. was a republic rather than a confederation. It got even more confusing when the 14th amendment was passed which gave the federal government far more power to enforce its rule in the south. But basically, at this point, states rights are limited only to laws or issues which the federal government has not covered (however there are federal laws against Marijuana). Since the 1950s, "states rights" has generally been racist code for "pro-segregationist." However, the term is often used (incorrectly) by states who want to make any sort of law that goes against federal laws. In this case, they mean the right for the state to legalize marijuana for medical or recreational use.
Now, just to make things messier, in the end, The President is the head of the executive (enforcement) branch of the government. He sets the agendas for all national law enforcement agencies. During Bush's term, the DEA was going after mmj dispensaries, especially in California. Obama said that at the beginning of his term that he would limit the DEA to fighting other problems, particularly meth and Mexican Cartels, rather than what he claimed was go around state laws. So, while technically states are not allowed to set their own policy on drugs such as marijuana, under Obama, if a state was to legalize marijuana, their would likely be little to no federal interference.
There is also a whole confusing field to navigate in terms of the difference between legalization and decriminalization that people say makes it compliant with federal law, and that the new law is an enforcement thing, but I don't fully understand how they could do that while taxing it and cleaning up the drug trade, so I'm not going to try to explain it.