Yoga pants are similar to sweat pants. Both are stretchy and comfy and very very casual. Many schools ban sweat pants, so why not yoga pants?
Leggings are NOT pants. They are basically tights, and when I see girls wearing them as pants it looks like they forget the rest of their clothes. I can see why the school would ban them.