Two ways to do that. One is the use of this extension. It add several new bbcodes one of which does youtube and other video embeds.
The other is to add this custom code to your board for embedding youtube videos. The html5 version has been recommended. This one uses the youtube tags your asking about.