This isn't a complete answer but it should give you some ideas or at least things to google.

This is really a question about moduli problems.

First of all perhaps we should define what we mean by "determined by the fibers" (Here for simplicity I will interpret "fibers" as being "geometric fibers"). Let $X\rightarrow S$ be a flat proper morphism of relative dimension 1. By flatness the arithmetic genus will be constant, lets call the genus $g$. For simplicity let us also assume that the geometric fibers of $X\rightarrow S$ are *stable*, the key point being that the automorphism groups are finite. In particular we assume $g\ge 2$. In general I will call a morphism of schemes $X\rightarrow S$ a stable curve if it is flat proper with stable curves as fibers.

In this case there is a nice geometric object associated to such families of curves, namely, the "moduli stack of stable curves of genus $g$", which we will denote by $\mathcal{M}_g$ (it's more commonly referred to as $\overline{\mathcal{M}_g}$, with $\mathcal{M}_g$ being reserved for the open substack of smooth curves). The key property of such a moduli stack is that there is a bijection between:
$$\{\text{$S$-isom classes of stable curves $X/S$}\}\stackrel{\sim}{\longrightarrow} \text{Hom}(S,\mathcal{M}_g)$$
(This is essentially the defining property of the moduli stack $\mathcal{M}_g$) Note that a moduli stack is not a scheme, but it sits inside the category (really a 2-category) of algebraic stacks, which contains the category of schemes as a full subcategory, and so the Hom on the right side is taken in this sense.

Even though $\mathcal{M}_g$ isn't a scheme, there is often (and in this case) a scheme which can be thought of as a best approximation for $\mathcal{M}_g$. This scheme we will denote by $M_g$, and is called the "coarse moduli scheme of stable curves of genus $g$". This scheme has the key property that for any algebraically closed field $k$, there is a bijection:
$$\{\text{$k$-isom classes of stable curves $X/k$}\}\stackrel{\sim}{\longrightarrow}\text{Hom}(\text{Spec }k,M_g)$$
Moreover, there is a natural map $p : \mathcal{M}_g\rightarrow M_g$ compatible with the key properties mentioned above. In particular, a given stable curve $X/S$ determines a map $S\rightarrow\mathcal{M}_g$, and hence a map $S\rightarrow M_g$ by composing with $p$.

Now if $S$ is reduced (and such that the closed points are dense in $S$, thanks Ariyan) and $M_g$ is separated (I think $M_g$ is always separated?), then any map $S\rightarrow M_g$ is determined by where it sends closed points, and so I would say that the data of "the (geometric) fibers of $X/S$" should perhaps be interpreted as the data of the map $S\rightarrow M_g$. On the other hand the isomorphism class of $X/S$ is equivalent to the map $S\rightarrow\mathcal{M}_g$, so we are interested in asking whether a particular map $S\rightarrow M_g$ has a unique lift to a map $S\rightarrow\mathcal{M}_g$.

This is certainly not always true. One remark is that the map $p : \mathcal{M}_g\rightarrow M_g$ "forgets information" (namely, the automorphism groups of the objects it parametrizes), and so above a point in $M_g$ some choices are required in choosing a "point" of $\mathcal{M}_g$ lying above it.

A fundamental intuitive example for this failure is that if you fix some curve $C$ with nontrivial automorphisms and $S$ is a "line segment", you can consider the trivial family $C\times S$ with fiber $C$ over $S$. From this trivial family, you can glue the fiber over one endpoint of $S$ to the fiber over the other endpoint of $S$ to produce a family with fibers $C$ over $S$-with-glued-endpoints (ie, a circle). The possible gluings correspond to automorphisms of $C$, and different gluings will generally give you nonisomorphic families over the circle (at least if the automorphism groups are discrete?). This can be carried out explicitly and quite easily by considering twists of elliptic curves. For example, the isotrivial elliptic curve given by $y^2 = x^3-1$ over $\text{Spec }\mathbb{C}[t,t^{-1}]$ has the same fibers (equivalently, same $j$-invariant) as the elliptic curve given by $ty^2 = x^3-1$ (over the same base), and yet it can be checked that they are not isomorphic over $\mathbb{C}[t,t^{-1}]$ (one needs to pass to $\mathbb{C}[\sqrt{t},\sqrt{t^{-1}}]$ for them to become isomorphic).

In both pictures the issue comes down to the existence of nontrivial automorphisms, and indeed at least for the moduli of stable curves, the map $p : \mathcal{M}_g\rightarrow M_g$ is an isomorphism at points (ie, stable curves) which have no nontrivial automorphisms. Thus for some $X/S$ such that the fibers have no automorphisms, then the associated map $S\rightarrow M_g$ will have a unique lift to a map $S\rightarrow\mathcal{M}_g$, simply because the image of $S\rightarrow M_g$ will be contained in a subscheme above which $p$ is an isomorphism.

The above point works for arbitrary bases $S$, though we require the fibers to have no nontrivial automorphisms.

If one is happy to restrict the base $S$ to schemes with trivial etale fundamental group (e.g. $\mathbb{A}^1_\mathbb{C}$), or at least etale fundamental groups of order coprime to the order of the automorphism groups of the fibers, then I expect it may be possible to remove the condition on the nonexistence of nontrivial automorphisms (Note that the fundamental (counter)example described above was only possible because the base was not simply connected, and this holds in the case with $dim(S) = 0$ due to the theory of twists). However, I'm just returning from a rather long vacation-from-math and I'm not sure if this is true for $dim(S) > 0$.

XandYnon-isomorphic $\mathbb{P}^1$-bundles overS, for example different Hirzebruch surfaces over $S=\mathbb{P}^1$. I think you're unlikely to be able to say anything without very strong conditions onS. $\endgroup$ – Martin Bright Sep 5 '18 at 21:16