M. Hochster classified the prime spectra of commutative rings as spectral spaces---quasi-compact T0 spaces whose quasi-compact open subsets are closed under finite intersection and each of whose nonempty irreducible closed subspaces has a unique generic point (see his paper). He additionally classifies the underlying topological spaces of schemes as open subspaces of spectral spaces (Prop. 16 of his paper).
In particular, as you indicate, any irreducible closed subspace of such a space has a unique generic point. (I believe this may even be an exercise in Hartshorne, I'll look for a reference when I get a chance...) So in particular, the two-point space with the indiscrete topology can't be the underlying topological space of a scheme. I'm sure there's a T0 example. I'll edit this if I can think of an example.