Since inline spoiler tags are not possible and I don't want 9,001 spoiler blocks, I'll preface this by saying:
This answer contains many spoilers for the Evangelion series. If you have not watched through at least episode 24, this will contain spoiler material for you.
As a note: Everyone in Shinji's class had lost their mothers (for potential soul salvaging for the Evas), and I believe most had relatives working at or connected with NERV. Each one was also obviously the same age, as a result of being born in the year of Second Impact 14 years prior.
In general, the candidates are chosen by the Marduk Institute, a committee which selects potential pilots for the Evangelion piloting program. They so happen to have listed Tōji Suzuhara at the top of their list, and so he ends up being the test pilot for Unit-03. According to an AU, Kensuke Aida is to be chosen after Tōji, but since there is an incident with Unit-04, this is never seen. There are extenuating circumstances for our main cast, though.
Rei Ayanami was chosen by Gendo because she is, in fact, one of many clones of Yui, Gendo's late wife. This was essentially an executive decision by Gendo so that he could use her for his Instrumentality plans.
Shinji Ikari was chosen, also by Gendo, for a different reason: Evangelion Unit-01 has the soul of Yui Ikari, Shinji's mother, in it, and Yui refuses to let anyone else pilot Unit-01.
Asuka Langley Sohryu was chosen because her mother, Kyoko, was in Germany with Asuka, performing the soul salvaging into Evangelion Unit-02. Obviously Asuka made a good match for a pilot.
And Kaworu, well... Kaworu is just the exception that proves the rule: He was sent by SEELE and is actually an Angel, so he doesn't follow convention. At all.
In the Rebuild continuity, this is slightly different. Rei's reason is the same; Asuka is just a very well trained pilot; Mari has powerful connections; Kaworu works for SEELE again; and Shinji's reason is unknown as of Rebuild 3.0.