Gastly appears in Tin Tower and Sprout Tower in all three games, additionally in Crystal it's a rare encounter on Routes 31, 32, and 36. Haunter can be found on Kanto Route 8, and in Crystal also in the Rock Tunnel. Gastly line members appear only at night.
Gastly is an interesting Pokémon. If you look at its stat distribution, you immediately think "Special sweeper!". If, on the other hand, you look at its movepool, you immediately think "bulky support mon!". Unfortunately for the Gastly line, its defenses are mediocre, and literally the ONLY special attacking move it can learn is TM Thief, an unSTABbed base 40 attack. (Remember that Shadow Ball is a physical move in this generation, which means it has considerably less power.) However, if you manage to preserve your Gastly long enough to evolve into a Gengar, the results are enormous, as Gengar can learn all three of the elemental Punches (which are special in this generation). This fact allows Gengar to have highly favorable matchups against the game's powerhouses, such as Chuck's Poliwrath and Lance's Dragonites. Although its pre-evolved movepool and stat distribution are whack, Gastly can still be a solid support mon due to its unique typing, which gives it crucial resistances such as Bug and Poison (both x0.25) as well as immunities to Normal and Fighting (but not Ground since Levitate does not exist yet). Because of this great typing, Gastly/Haunter can tank a hit or two against some of the fiercest attackers in the whole game, such as Bugsy's Scyther, Whitney's Miltank (who doesn't have Scrappy like in the remakes), and Chuck's Poliwrath, giving it the opportunity to use a status move in return such as Hypnosis, Confuse Ray, or even Curse. Gastly definitely has plenty of flaws which hold it back from being a high tier mon, but it is nonetheless pretty good at what it does, which is to annoy the opponent to death.
Gym #1 - Falkner (Violet City, Flying-type): Pidgeotto's Gust does way too much damage, but you can try putting his birds to sleep.
Gym #2 - Bugsy (Azalea Town, Bug-type): Again, you hardwall Scyther (at least before it stacks up on Fury Cutter), just hope that the odds are in your favor with Hypnosis hax.
Rival (Azalea Town): Gastly can probably (eventually) defeat Bayleef, but you should probably stay away in general. You could theoretically take on his own Gastly, if you're higher levelled, but remember that he has the exact same hax you do and that skirmish can become an unfavourable healstall when it starts putting you to sleep. The other two starters outdamage you, stay away from them as well. And finally, Zubat has super-effective Bite, which you don't want, even though it's a special move.
Gym #3 - Whitney (Goldenrod City, Normal-type): This fight really depends on both hax and what the AI decides to do. If you manage to put Miltank to sleep, you're golden; if not, then have fun getting swept clean.
Rival (Burned Tower): Gastly does not match up very well here. Basically, the same thing as in Azalea, but with additional Magnemite.
Gym #4 - Morty (Ecruteak City, Ghost-type): Again, this is not a very good matchup at all unless you are a Gengar and/or overleveled. Ghost moves hit hard, and you have no access to Shadow Ball. As Gengar, though, Gastly and the two Haunter will be a breeze.
Gym #5 - Chuck (Cianwood City, Fighting-type): Primeape literally can't touch Haunter, and Haunter can outspeed Poliwrath and put it to sleep. Surf will hurt a lot though. If you have Gengar by this point, however, it can simply 2HKO or even OHKO Poliwrath with ThunderPunch.
Gym #6 - Jasmine (Olivine City, Steel-type): You probably want to avoid this fight if you are Haunter, but Gengar should be able to wipe the floor with Fire Punch.
Rocket Executive battle #1 (Team Rocket HQ): This is where the Gastly line's amazing typing comes into play, as you can destroy every single Poison-type here without having to worry about them going boom. Just watch out for Bite on a Raticate.
Rocket Executive battle #2 (Team Rocket HQ): Definitely WATCH OUT FOR MURKROW'S PURSUIT. That move is unforgiving, and any stage of this evolution line needs to GTFO before it's used, or if you're playing Set mode, before Murkrow comes out.
Gym #7 - Pryce (Mahogany Town, Ice-type): Haunter can potentially win a stall war with Hypnosis/Confuse Ray/Night Shade/Curse. Gengar easily wins with a combo of ThunderPunch and Fire Punch. Just be aware that you may not be able to OHKO the highly bulky Dewgong, though they can't OHKO Gengar, either.
Rocket Executive battle #3 (Goldenrod Radio Tower): Again, Haunter or Gengar's great typing allows it to basically solo this fight with relative ease. You can laugh at the bomb moves like they're nothing.
Rival (Goldenrod Underground): Haunter struggles big time, but Gengar can 2HKO everything at worst with the right coverage move.
Rocket Executive battle #4 (Goldenrod Radio Tower): Gengar resists nearly everything here, but should be very wary of Murkrow once again. Switch it out before the bird enters the battlefield if you can, especially if you still only have a Haunter; you don't want to take a Pursuit.
Rocket Executive battle #5 (Goldenrod Radio Tower): Faint Attack abound, and not much to counter it with. Leave these Pokémon alone. Only fight Koffing, if you want to, which is absolutely non-threatening.
Suicune (Bell Tower, Crystal only): Haunter is not made for this. Gengar, on the other hand, should have a relatively easy time with ThunderPunch, but might need healing if Suicune starts spamming BubbleBeam under the rain.
Gym #8 - Clair (Blackthorn City, Dragon-type): Again, Haunter has a tough time here, but Gengar can reliably OHKO any Dratinis or Dragonairs. Just watch out for Kingdra, though Gengar has the amazing perk of being immune to Hyper Beam, and its Surf is a lot less troublesome.
Rival (Victory Road): Haunter struggles big time, but Gengar can 2HKO everything at worst with the right coverage move. Sounds similar? That's Gengar's gimmick.
Elite Four Will (Indigo Plateau, Psychic-type): Gengar has super-effective coverage against each mon here, but if any of them live, then they will Psychic you to death. So be very careful.
Elite Four Koga (Indigo Plateau, Poison-type): You can OHKO the Ariados, Forretress and Venomoth with Fire Punch, but the Muk will tank a hit or two or three because it has a lot of special bulk and the Crobat will probably outspeed you. Again, be careful.
Elite Four Bruno (Indigo Plateau, Fighting-type): You should be able to handle the Hitmons and Onix without too much trouble, but that Machamp is going to be doing way too much damage with Rock Slide for you to want to stay in.
Elite Four Karen (Indigo Plateau, Dark-type): Umbreon and Houndoom hardwall you, the opposing Gengar almost certainly won't be OHKOed, and the Vileplume and Murkrow fall to the appropriate elemental Punch.
Champion Lance (Indigo Plateau, Flying-type): ThunderPunch Gyarados and Ice Punch the Dragonites. Aerodactyl will probably outspeed and Charizard will probably be able to tank a hit, though.
From this point onwards, you can fight the gyms in any order, though you will need to retrieve the Machine Parts from the Cerulean City gym before you have access to the earlier portion of Kanto. Feel free to anticipate or postpone any battles as needed.
Gym #9 - Brock (Pewter City, Rock-type): Gengar's best weapon in this fight is Giga Drain, which will annihilate everything. However, if you don't want to waste the TM, you can still defeat the Rock/Ground-types with Ice Punch and the two fossils with ThunderPunch.
Rival (Mt. Moon, optional): Again, Gengar has good coverage for everything, but should not attempt Alakazam unless you're both sure to outspeed and have Shadow Ball. Against the rival's Gengar, the best move to use is Psychic, or if not, Shadow Ball again. Use the elemental Punches to get rid of the rest.
Gym #10 - Misty (Cerulean City, Water-type): ThunderPunch is a godsend here. Ironically, you shouldn't worry about Starmie because it doesn't have Psychic, but Golduck does. Still, Golduck probably can't OHKO Gengar with Psychic, especially considering the level difference. Use either Giga Drain or another Pokémon for Quagsire; it has Earthquake.
Gym #11 - Lt. Surge (Vermilion City, Electric-type): Gengar laughs at all the explosives in this gym and annihilates everything with whatever move you have, other than ThunderPunch.
Gym #12 - Erika (Celadon City, Grass-type): Ice Punch or Fire Punch both work very well here. Heck, even Psychic, at least for Victreebel.
Gym #13 - Janine (Fuchsia City, Poison-type): Psychic is good to have for this gym, but not necessary. Everything is underleveled anyway, meaning even the elemental Punches will suffice. Gengar also needs to worry very little about their own STAB and is immune to the Weezing's Explosion.
Gym #14 - Sabrina (Saffron City, Psychic-type): Shadow Ball is great, but this fight is risky due to Gengar's second typing. Be overleveled and prepared: if you don't OHKO them, they will OHKO you.
Gym #15 - Blaine (Seafoam Islands, Fire-type): Fire Blast is fairly strong, but the Pokémon aren't too scary. Gengar should be able to dispose of them with ThunderPunch or, if you have it, Psychic. Shadow Ball is not recommended, it will likely deal less damage to anything but Rapidash.
Gym #16 - Blue (Viridian City): Pidgeot can do next to nothing to Gengar. Exeggutor falls to Ice Punch, and Gyarados to ThunderPunch. Rhydon may or may not be offed by Ice Punch, but when in doubt, don't try: it has Earthquake and will completely destroy the ghost. Go for it with Alakazam if you have Shadow Ball, but not otherwise. Use whatever your strongest move is against Arcanine.
Rival (Indigo Plateau, optional): Similar to basically every single battle before it. Golbat is now a Crobat but not much has changed, just spam your favorite coverage Punch and then use Shadow Ball for Alakazam and Gengar, or if you don't have that, withdraw when Alakazam comes and take down the rival's Gengar with Psychic.
Red (Mt. Silver): Snorlax literally can't touch Gengar, but Gengar can only do marginal damage back (except for Curse or Swagger, that is), so there is a legitimate possibility of Snorlax running out of PP and then KOing Gengar with Struggle (which from Generation II onwards deals typeless damage). Gengar can take care of the weak Pikachu, too, as well as Venusaur, but struggles against Espeon, Charizard and Blastoise (ThunderPunch probably won't OHKO). On the upside, only Espeon threatens Gengar a great deal, while Charizard and Blastoise wrestle with it, and it should hold its own.
Right off the bat, Gastly has Hypnosis, which can be an invaluable asset early game especially when you consider its amazing typing. Curse, at level 16, despite being highly risky, can be a legitimate option early-game when you know that the opponent will not be able to deal any sort of significant damage to you. Night Shade, at level 21, is a decent damaging option as well as Shadow Ball, via TM; they will usually do around the same damage to the average Pokémon whenever Haunter is in the mid-20s. Confuse Ray, at level 28 for Gastly, 31 for Haunter and Gengar, may seem appealing, but Gastly unfortunately learns it so late that it becomes more risk than reward.
If you manage to evolve Haunter into Gengar, however, there is no reason for you not to run Ice Punch, Fire Punch and ThunderPunch on Gengar in order to maximize its special attacking potential. The Nightmare TM may seem like a good idea on paper, but its mechanics work such that it only deals damage while the opponent is asleep during the same sleep cycle. So if you use Nightmare while the opponent uses Rest, and then the opponent wakes up next turn, you have to use Nightmare AGAIN once the enemy starts sleeping again. That's Trollfreak for you. Finally, the Swagger TM deserves a mention solely for the fact that it essentially guarantees Gengar's victory against Red's Snorlax. You can also teach Giga Drain and Psychic, but those only come in the postgame.
Minimum stats are calculated with 0 EVs, IVs of 0, and a hindering nature, if applicable.
Maximum stats are calculated with 252 EVs, IVs of 31, and a helpful nature, if applicable.
Gastly Line Ratings
At what point in the game should I be evolved? If you have the means to initiate a trade evolution with yourself (or if you have some useful hacking tools), then evolve Haunter to Gengar ASAP. It cannot be overemphasized how much better Gengar is than Haunter because of the former's access to all three elemental Punches, whereas Haunter literally has to resort to Thief if it wants to deal special damage.
How good is the Gastly line in a Nuzlocke? Again, it all depends on whether or not you can evolve it into a Gengar. If you can, Gastly definitely becomes a solid mid to upper tier mon -- not quite top tier, but still really good. If you want a Pokémon that can hardwall a good portion of the early-game and then provide you with a plethora of sweeping opportunities in the late game, then Gastly is exactly the Pokémon you want on your team. If you can't, you will be disappointed by the lack of power and sheer versatility that comes from its great coverage.
Weaknesses: Psychic, Ghost, Dark, Ground
Resistances: Grass, Poison (x0.25), Bug (x0.25)
Immunities: Normal, Fighting
Neutralities: Rock, Steel, Dragon, Fire, Flying, Ice, Water, Electric