Even the first-order infinitesimal neighborhood of a subvariety typically depends on more than the normal bundle, cf. Exercise III.4.10, p. 225 of Hartshorne's "Algebraic Geometry".  However, for some special choices of subvariety and normal bundle, the formal neighborhood is automatically formally isomorphic to the formal neighborhood of the zero section in the normal bundle.