Why is the basicity of para- > meta- > aniline > ortho-
($\mathrm pK_\mathrm a$: ortho: 9.53, meta: 9.12, para: 7.96) I tried deducing it using resonance and inductive effects but got stuck.
As Mithoron pointed out in a comment, we had a similar question convering the cases of 2-methylaniline (o-toluidine) and 2-methylbenzoic acid (o-toluic acid) here.
In the case of 1,2-diaminobenzene (o-phenylenediamine), it is conceivable that hydrogen bonding between the two amino groups reduces the electron density on one of the nitrogen atoms, thereby leading to a slight increase on the other. As a result, o-phenylenediamine is significantly less basic than the m- and p-isomer, but a tad more basic than aniline.
Klaus's answer is nice, but is omits one important detail:
The hydrogen bonding would necessarily require that the lone pair of electrons go 'out of conjugation' with the ring system, and hence there can be no donation of electron density via pi-effects as in the para-phenylenediamine case.