When you say "deformation functor", you have to be careful to specify exactly which functor you are thinking about. There are two relevant deformation functors at play here.
One is the functor $D$ of abstract deformations of $Y$. If $A$ is an Artin local $k$-algebra, then $D(A)$ is the set of isomorphism classes of flat families $Y_A$ over $A$ whose central fiber is isomorphic to $Y$.
The other functor $D'$ is the functor of deformations of $Y$ inside $\mathbb{P}^n_k$. Here, $D'(A)$ is the set of isomorphism classes of flat families $Y_A$ together with an embedding $Y_A \rightarrow \mathbb{P}^n_k \times Spec A$ such that the central fiber is $Y \rightarrow \mathbb{P}^n_k$ (not isomorphic to $Y$, but exactly $Y$, as we are talking about subschemes of $\mathbb{P}^n_k$).
The functor $D$ does not have any direct relationship to the Hilbert scheme, but the functor D' certainly does.
Given any scheme $X$ and a point $x \in X$, the local ring $\mathcal{O}_x$ defines a functor $F: (Art)_k \rightarrow (Sets)$ by setting $F(A) = Hom(Spec A, Spec \mathcal{O}_x)$. We say that $F$ is pro-represented by $\mathcal{O}_x$.
If you take the local ring $\mathcal{O}_{[Y]}$ of the Hilbert scheme (which you probably know to be representable by an honest scheme by a theorem of Grothendieck) at the point $[Y]$, then the functor it pro-represents is none other than $D'$.
Being pro-representable is stronger than having a versal deformation space; it means that the functor has a universal deformation space, which is the formal completion of the point whose local ring is doing the pro-representing.
So the (uni)versal deformation space of $D'$ is the formal completion of the point $[Y]$ in the Hilbert scheme. As for the versal deformation space of $D$, I am not really sure what it looks like, but there is a morphism $D' \rightarrow D$ of deformation functors given by forgetting the embedding of $Y_A \rightarrow \mathbb{P}^n_k \times Spec A$.
In general, I think of a versal deformation space as an infinitesimal object; it is only keeping track of what happens when you deform $Y$ a little bit. The Hilbert scheme, on the other hand, is global; it is keeping track of all subschemes with the same Hilbert polynomial as $Y$, including ones which might be far away from $Y$ (if $Y$ was a point, for instance). Thus, you would expect the versal deformation space of the appropriate functor to map into the Hilbert scheme, rather than the other way around.
[This is now an answer to the edited question(s), with some details added.
My answer to the original question is kept at the very end.]
Firstly: The question is a good one, and it is not easy to find references on
this. I had spent too much time pondering about the failure of the double dual
argument (see below) before I finally heard the arguement given in the last
section below, indirectly from Fantechi, via Faber.
Assume $X$ is smooth projective.
Definition: An $S$-valued point in $M_I(X)$ is an $S$-flat coherent sheaf on
$S\times X$, with stable fibres of rank one, and with determinant line bundle
isomorphic to $\mathcal{O}_{S\times X}$, modulo isomorphism.
(I do not know if this is what Bridgeland meant, but to me this is resonably
standard.)
Comment: Stability for rank one means torsion free.
Existence: Let $M(X)$ be the (Simpson) moduli space for stable rank one
sheaves. Then $M_I(X)$ is the fibre over $\mathcal{O}_X$ for the determinant
map $M(X) \to \mathrm{Pic}(X)$. This map sends a sheaf $I$ (stable rank one
fibres) on $S\times X$ to the determinant line bundle $\det(I)$, and it is
trivial as a point in $\mathrm{Pic}(X)$ if it is of the form $p^*L$ with
$L\in\mathrm{Pic}(S)$. Then $I\otimes p^*L^{-1}$ is equivalent to $I$
in $M(X)(S)$, and it has trivial determinant. This shows that $M_I(X)$
indeed is a fibre of the determinant map.
Of course the determinant of an ideal $I_Y\subset \mathcal{O}_X$ is nontrivial
if $Y$ is a non principal divisor, so you cannot map such ideals to $M_I(X)$.
In any case, the ideal of a divisor, without the embedding, would only
remember the linear equivalence class.
For brevity, let $\mathrm{Hilb}(X)$ be the part of the Hilbert scheme
parametrizing subschemes $Y\subset X$ of codimension at least $2$.
Then there is a natural map $F: \mathrm{Hilb}(X) \to M(X)$ that sends an ideal
$I_Y\subset\mathcal{O}_{S\times X}$ to $I_Y$, forgetting the embedding. Since $Y$ is
flat, so is $I_Y$, and its fibres are torsion free (by flatness again) of rank
one. By the codimension assumption, the determinant of $I$ is trivial.
Theorem: $F$ is an isomorphism.
Comment: In the literature one sometimes finds the argument that if $I$ is a
rank one torsion free sheaf with trivial determinant, then $I$ embeds into its
double dual, which coincides with its determinant $\mathcal{O}_X$. This
establishes bijectivity on points. (For Hilbert schemes of points on surfaces
this is enough to conclude, since you can check independently that both
$\mathrm{Hilb}(X)$ and $M_I(X)$ are smooth, and that the induced map on tangent
spaces is an isomorphism.) I do not know how to make sense of this argument in
families.
Sketch proof of theorem: The essential point is to show that every $I$ in
$M_I(X)(S)$ has a canonical embedding into $\mathcal{O}_{S\times X}$ such that the
quotient is $S$-flat.
Let $U\subset S\times X$ be the open subset where $I$ is locally free. Its
complement has codimension at least $2$ in all fibres. By the trivial
determinant assumption, the restriction of $I$ to $U$ is trivial. By codimension $2$,
the trivialization extends to a map $I\to \mathcal{O}_{S\times X}$. This map is injective,
in fact injective in all fibres: The restriction to each
fibre $\{s\}\times X$ is nonzero (as $U$ intersects
all fibres) and hence an embedding ($I$ is torsion free in fibres). It
follows that the quotient is flat. There are some details to check, but
this is the main point, I think.
[End of new answer, here is the original one:]
If we attempt to define $M_I(X)(S)$ as the set of $S$-flat ideals $I_Z$ in
$\mathcal{O}_{S\times X}$, then that would not be functorial in $S$, as the
inclusion $I_Z \subset \mathcal{O}_{S\times X}$ may not continue to be injective after
base change (in the counter example in the other answer, restriction to the problematic fibre gives the zero map). We could impose
"universal injectivity", but that is just another way of requiring the
quotient $\mathcal{O}_Z$ to be $S$-flat, so then we have (re)defined the Hilbert
scheme.
Another common way of defining moduli of ideals is as the moduli space for rank
one stable sheaves (i.e. torsion free) with trivial determinant line bundle.
The resulting moduli space is isomorphic to the Hilbert scheme of subschemes of
codimension at least 2.
Best Answer
It seems to me that $$\mathscr{I}_Z^{\vee\vee}\simeq \mathscr{O}_X,$$ because the left-hand side is reflexive and isomorphic to $\mathscr{O}_X$ away from $Z$, which has codimension at least $2$ by assumption. In other words, the abstract sheaf $\mathscr{I}_Z$ is canonically embedded in $\mathscr{O}_X$ via the double-dual map $$\mathscr{I}_Z\to \mathscr{I}_Z^{\vee\vee}\simeq \mathscr{O}_X.$$
So the inverse map you are looking for is induced by $$\mathscr{I}_Z\mapsto (\mathscr{O}_X\simeq\mathscr{I}_Z^{\vee\vee}\to \text{coker}(\mathscr{I}_Z\to \mathscr{I}_Z^{\vee\vee})\simeq \mathscr{O}_Z).$$
I suppose I used that $X$ is smooth in the identification $$\mathscr{I}_Z^{\vee\vee}\simeq \mathscr{O}_X,$$ but you can probably relax this a bit. (I'm a little worried about making this work in families, which is, strictly speaking, necessary; so this answer is not quite complete.)