Marijuana is not legal in Cambodia and the police are beginning to take a harder line on it. There have been several busts (and a few set-ups) of foreigner-owned bars and restaurants where ganja was smoked, so the days of free bowls in guesthouses are definitely history. Marijuana is traditionally used in some Khmer dishes, so it will continue to be around for a long time, but if you are a smoker, be discreet.
This advice applies equally to other narcotic substances, which are also illegal. And think twice about buying any pills from a 'friendly' street dealer, as they may turn out to be tranquillisers and you'll wake up as a robbery victim.
Travellers should note that they can be prosecuted under the law of their home country regarding age of consent, even when abroad.