This is several years late, but it may be helpful nonetheless.

As alluded to by Buschi, Olivia has given an explicit answer to this in Theorem 2.1.29 of her monograph **Theories, Sites and Toposes**:

Let $\mathbb{T}$ be a geometric theory, $\mathcal{E}$ a Grothendieck
topos and $M$ a model of $\mathbb{T}$ in $\mathcal{E}$. Then
$\mathcal{E}$ is a classifying topos of $\mathbb{T}$ and $M$ is a
universal model (i.e. generic model) of $\mathbb{T}$ iff the following
conditions are satisfied:

- The family $F$ of objects which can be built from the interpretations in $M$ of the sorts, function symbols and relation
symbols over the signature of $\mathbb{T}$ by using geometric logic
constructions (i.e. the objects given by the domains of the
interpretations in $M$ of geometric formulae over the signature of
$\mathbb{T}$) is separating for $\mathcal{E}$.
- The model $M$ is conservative for $\mathbb{T}$, that is for any geometric sequent $\sigma$ over the signature of $\mathbb{T}$, $\sigma$ is valid in $M$ if and only if it is provable in
$\mathbb{T}$.
- Any arrow $k$ in $\mathcal{E}$ between objects $A$ and $B$ in the family $F$ of condition (1) is definable; that is, if $A$ (resp. $B$)
is equal to the interpretation of a geometric formula $\phi(\vec{x})$
(resp. $\psi(\vec{y})$) over the signature of $\mathbb{T}$, there
exists a $\mathbb{T}$-provably functional formula $\theta$ from

$\phi(\vec{x})$ to $\psi(\vec{y})$ such that the interpretation of
$\theta$ in $M$ is equal to the graph of $k$.

I'm not sure if you were looking necessary and sufficient conditions on $M$ and $\mathcal{E}$, or just merely sufficient conditions, but since this Theorem gives an 'iff' result, one might try and prove the sufficiency of certain (perhaps more intuitive) critiera on $M$ and $\mathcal{E}$ by checking against the conditions listed in this theorem, i.e. by proving results of the flavour: 'If $M$ and $\mathcal{E}$ satisfy condition $X$, then they satisfy the 3 conditions of this theorem.'

Extending this thought, I am curious to see how these conditions relate to the special case mentioned in Dylan's comment. In particular, how does weak contractibility relate to the conditions spelt out by Olivia? This is not obvious to me, but I haven't taken the time to properly work through the details.