When should I build a Stalker as my first unit over a Zealot, and why?

As mentioned in the Reaper question. You need a stalker to deal with early Reapers as Photon Cannons tend to set you back by too much. However, there is no reason it has to be the first unit you build.

Since a Stalker requires a Cybernetics Core (60 second build time) and it in turn requires a Gateway (which can build Zealots with a 33 second build time) you can easily build a Zealot while waiting for the Cybernetics Core to finish.

So the better question is: "Why wouldn't you?"

  • A Zealot costs 100 Minerals and 2 Psi to build.
  • A Stalker costs 125 Minerals 50 Gas and 2 Psi to build.

Obviously if you can't afford another Pylon and only have 2 Psi to spare it makes sense to cut the Zealot. But consider also the costs to build a Stalker: A Vespean Assimilator (75 minerals), Probes harvesting Gas instead of Minerals, the additional cost of the Cybernetics Core (150 Minerals). These all add up. That said you can (if you play decently) afford both.

Other things to consider. Once your stalker is built what are you going to build next? "Standard" play is usually to add on another Gateway (150 Mineral cost). By cutting that Zealot you can start building a second Gateway before your Stalker is ready. You'll probably also need more Psi at this point, and a Pylon has the same cost as a Zealot. Its worth noting that you should have a better economy once the Stalker is finished (you were building probes this whole time right?), so these things will still be affordable.

So to answer your unasked question: Should you cut the production of the first Zealot?

Try it out! Play a couple times where you build both, and where you only build the Stalker. How much Minerals do you have? Does it feel like enough for the rest of your game plan? Would 100 Minerals help you? Would you rather have that Zealot to help block your entrance?

This all depends on what your strategy is, so what you need to do is try both and decide. They're two options and there is no correct answer.

For reference material here is Tester vs IntoTheRainbow in the Razor King of the Beta Tournament.

  • Game 1 -> doesn't build a Zealot before his Stalker
  • Game 2 -> builds a Zealot first then a Stalker

Stalkers are important to get early against Terran to counter the potential Reaper rush. Reapers can kite Zealots all day long and you'll never even get a hit in, while a Stalker takes almost no damage and kills Reapers quickly.