Smoking by minors is forbidden by law.

Literal

Minors' smoking [topic-は] law [by-で] is-prohibited.

未成年者の喫煙 ('minors' smoking') is a nominalized subject phrase, with の marking 未成年者 as the possessor/agent of 喫煙 — a compact alternative to turning the whole clause into a relative clause. 法律で uses で to mark the instrument or means: 'by [the means of] law.' This kind of formal noun-phrase subject paired with passive predicate is typical of legal and regulatory writing.