What event or lack therof causes the storyline/plot to branch off into three seperate ones: Fate, UBW and HF
In UBW, Shirou commands Saber not to attack Archer on the first night; in Fate, he doesn't do that. In HF, Shirou accompanies Sakura to her home on the first night; in UBW and Fate, he doesn't do that. Broadly speaking, UBW diverges against Fate because Archer does not suffer injury, allowing him to maintain a more active role in the early stages of the war. HF diverges against Fate/UBW because (spoilered because it sounds like you haven't read it)
this puts Sakura into a more active role in the war, causing that whole mess with the shadow. Also, Zouken.
How does this lead to the vastly different outcomes in each of the three routes? We can posit some explanations, but it's important to keep in mind that any explanation is likely to be somewhat contrived, simply because it's unlikely that Nasu wrote F/SN from the perspective of "if I change this one small thing, what would the logical outcomes be?". That is, the routes are presumably the fundamental things that Nasu wanted to write, and the divergence points exist to make them plausible. (The alternative would be that the divergence points are the fundamental thing in the narrative, and the routes are just logical consequences thereof. See footnote 1 for an example of what I mean.)
Anyway, let's posit a bit.
For example, why is Shiro with Saber in "Fate" route and not with Rin?
Let me reverse the question: why is Shirou with Rin in UBW, and not with Saber? Well, in UBW, Shirou spends relatively little time with Saber, initially because of her abduction by Caster, and later because Saber re-contracts with Rin through the end of the route.
In Fate, Shirou isn't deprived of interaction with Saber, and so he develops a relationship with her (and hence not with Rin). I think it's uncontroversial to say that Saber is the "main heroine" of F/SN (given Last Episode, if nothing else); in the absence of barriers to them developing a relationship, I figure they would, in fact, get together. Note that in HF, the barrier is that
the shadow ganks Saber on day 3.
Why does Archer not enact his "kill Shiro" plan in "Fate" and "HF"?
Archer subordinates his desire to get rid of Shirou to the need to deal with the shadow, which poses an existential threat. The shadow existing is an indirect consequence of the divergence point for HF - Shirou walks Sakura home; Zouken sees this and thrusts Sakura into a more active role in the war; the shadow is the result of that.
I don't have any good explanation for why Archer doesn't do that in Fate. Maybe we can write it off as Archer being injured (because of Saber on the first night) and not really in a position to deal with Shirou.
1 Well, this is a spoiler for a non-F/SN thing, and telling you what it's for is would be a spoiler too, so hover if you dare.
The various timelines of Madoka Magica do quite a good job of exploring the outcomes that result from Homura effectively causing divergences by changing the way she acts after she wakes up in the hospital on day one. It's not a perfect analogy to F/SN, since the timelines don't all start from exactly the same place (Homura gains additional knowledge in each successive timeline), but it's close.