I've gone through the process, so here is my experience.
Marijuana use won't be disqualifying in itself but it will be considered a negative factor for getting a security clearance.
Usually if it occurred well in the past and doesn't establish a pattern of questionable behavior (for example you used marijuana, had a DUI, had other misdemeanors in the same period ), it will be OK.
It's a much bigger problem if the use is ongoing or fairly recent and can not be chalked up as youthful indiscretion.
If you are planning to apply for any jobs / internships that require security clearance, I suggest not using marijuana. And yes, there are internships that require security clearance.
You might even be disqualified from some jobs that don't require security clearance. I worked on a NOAA contract that required "public trust" - basically a background check - which actually uses the same process used for getting a security clearance. While the bar for getting that is much lower, they still ask for drug use and expect you to disclose it.
Just recently HR sent a company wide email forwarding guidance from the federal government that despite states making marijuana use legal, it (the federal government) still considers it illicit drug.
So long story short - if you are planning a career that has anything to do with the federal government do not use marijuana.