The church has no issue against using alcohol in moderation. It becomes a sin when we completely lose the use of reason or if the motivations for drinking are immoral(e.g. our intent)
Now with marijuana there is two sides to the story. One believes it fall under the category of drugs highlight in 2291 of the CCC. The other believes it falls under the category of every kind of excess found in 2290. Such things that fall under 2291 are morphine, vicodin, cocaine, meth, and heroin. Things that can fall under 2290 would be caffeine, coco tea(with small amount of cocaine naturally found in it), tobacco, and alcohol. Although disobeying lawful authority can be a sin, it does not make a substance morally wrong. Alcohol is illegal in Kuwait, but it’s use is not a sin. Meth was legal in Bangkok, however it’s use was still a sin given the grave damage it does to both body, mind, and spirit.
Priests that I have talked to say, our intent for using a substance, along with risk to damage human life determines whether it be a sin or not.