None has ever accused Hollywood of being scientifically accurate or logical, but some things they can never seem to get right. For science fiction fans - hard SF especially - the biggest issues are with technology, and most of all, with weapons. I'm not talking about the lack of reloading and gun safety, the horrible techniques and tactics in gunfights, but rather the actual choice of weapons. While grenade launchers, miniguns, handguns, and sniper rifles are all regularly abused flame-throwers are frequently the worst offenders.
Within SF as a whole one genre suffers particularly from the misuse of flame-throwers; Horror. Sometimes it seems that every second SF horror/thriller movie where the antagonist is an alien or monster fire is its main weakness.
And that seems reasonable, yes? Animals are in general afraid of fire, so why not monsters? Also, the damage caused by a flame-thrower is truly horrific, rivalled only grenades or concentrated machine-gun fire, so it seems a good choice to take down a nigh invulnerable opponent. Where and when they are used is a little more difficult to accept.
Flame-throwers in the real world are slightly different to their Hollywood kin. Almost exclusively used by militaries during the World Wars for clearing bunkers, machinegun nests, and occasionally against tanks, real steel flamethrowers are cumbersome and dangerous. They are also useless in confined spaces; when used against a bunker they were always fired from outside, as seen in Saving Private Ryan.
Another mode, really seen, is when the fuel is pumped out in a cohesive stream, seen in the lower image to the left, allowing much greater range; it could also coat the target in burning fuel, rather than just flames, making it effective against vehicles. It is actually a burning stream of fuel, rather than the fireball produced by a spray-type nozzle.
Finally, they carried only a few seconds worth fuel, and that only by using large backpack style tanks. These tanks, unlike the movie portrayal, did not easily explode from enemy weapons fire, but where significantly heavier than most other weapons systems, restricting the soldiers agility.
Quite apart from the question of why the cargo tug Nostromo was carrying flame-throwers aboard the 'flame units' shown in this iconic film suffered from the usual failings. First up the fuel tanks were to small, and even if they were under massive pressure, or contained liquid gas, would not carry enough to fire for the length of time seen in the movie. Of course, it could just be that we are never shown the tanks being replaced. Secondly is its use inside the spacecraft. Aside from the inevitable damage to electrical wiring and other systems the flame-thrower would rapidly consume the oxygen in the room. While the life support system might be able to replace it fast enough to save the crew's lives, the chances are that after a few bursts of flame they would have fainted from oxygen deprivation. This would also have killed Dallas in the ducts long before the xenomorph got him, if the sheer temperature of the flame did not do so. Aliens suffered almost identical problems; namely burn time and usage in close quarters, although it was handled a lot better than in many movies.
Although The Thing showed a flamethrower with realistic fuel tanks, it still understated the danger of using one inside a confined space. Unusually for the movies that feature them, there is actually a reason for an arctic base to have flamethrowers, as they can be used to rapidly melt accumulations of snow and ice in an emergency - although as far as I can tell no current arctic base does have them on hand. That given it is likely that the flamethrower is a weaker than nomad version, making it possible to use inside a building without setting the entire room on fire. However, it would likely cause severe problems through lack of oxygen in the minutes after its use, and the danger of the fires it starts cannot be overestimated.
While it is far from the worst world building in it is possible to commit, the unrealistic use of flame-throwers in SF is one that should be easy enough to avoid for the author prepared to put some effort into research. That being said, flamethrowers are cool, so it is a forgivable error. If you are trying to create a visually impressive film/movie/animation/etc. then a flamethrower gives a lot of bang for the buck. A writer, especially if looking to edge in on 'hard SF' should consider it long and carefully.
But when xenomorphs come knocking, we all know the only true solution is: KILL IT WITH FIRE.