The UN has not banned flamethrowers. The UN does not ban weapons, as it does not have the power to overrule the laws of a sovereign nation. It is used as a forum to debate and enact international treaties. An arms-limitation treaty might be debated and signed at the UN, but the treaty still has to be ratified by each nation's government. Thus, the Ottawa Treaty restricting the use of landmines wasn't ratified by most of the permanent UN Security Council members and some other nations [http://en.wikipedia.org/wiki/List_of_parties_to_the_Ottawa_Treaty#Non-signatory_states]--basically the nations that actually produce and use landmines in the first place, so the treaty's fairly useless.
Flamethrowers are not banned under any international treaty [http://slate.msn.com/id/2057933]. The U.S. military, and presumably most other militaries, unilaterally decided to stop using them. Partly because of the bad PR they generate, but I suspect they're just impractical. Incendiary grenades are much better--you can throw (or launch) them farther, you can throw them into caves or buildings without having to enter yourself (both of these mean you stay far away from the flames), and you're not wearing a big gas-bomb on your back.