Part 2: [Baily-Borel][1]! At least if $G$ is the real points of, say, a reductive algebraic group, and $H$ is a maximal compact subgroup.

In their seminal Annals paper, Baily and Borel construct sufficiently many theta functions on the quotient of a bounded symmetric space (e.g. $G(\mathbf{R})/K$ with $G$ connected reductive over, say, the rationals, and $K$ a maximal compact) by an arithmetic subgroup (i.e. "$G(\mathbf{Z})$" (this makes sense up to some finite error)) that they can embed the quotient into a big projective space, giving the quotient the structure of a quasi-projective variety over the complexes. This is general enough to explain the symplectic group example you give in the question, for example.

Deligne then went on, axiomatising work of Shimura, to show that if furthermore $G$ satisfied certain axioms, then all of this would go through through over a number field. See Deligne's "Travaux de Shimura" and his article on Shimura varieties in the Corvallis proceedings. This explains why the moduli space of princ polarized ab vars is a variety over the rationals, for example.


  [1]: http://en.wikipedia.org/wiki/Baily%E2%80%93Borel_compactification