Robert describes the differential equations which one can write in terms of $\tau$ and $\kappa$, and the inherent limitations in this local approach. But maybe one can find more reasonable or useful conditions in terms of integral equations, and the whole problem could be much more interesting or natural if we consider closed curves. In other words, a global approach could be more enlightening.
For instance, a necessary condition for a closed curve to lie on a sphere is that $\int \tau=0$, e.g. see p.171 of Millman and Parker, which incidentally turns out to characterize spheres. Furthermore, any closed curve lying on a convex surface must have at least $4$ points where $\tau=0$, which is a generalization of the classical four vertex theorem due to Sedykh; see also this paper for another proof, and this paper for a generalization. Another necessary condition for a curve to lie on an ellipsoid is that it have a pair of parallel tangent lines, which turns out to characterize ellipsoids, as described in this paper with Bruce Solomon.
It would be interesting to find more simple or nice necessary conditions for a closed curve to lie on an ellipsoid, and I think it is possible that a collection of these may turn out to be sufficient as well.
Addendum: I found a nice paper which seems to be quite relevant:
Kreyszig, Erwin; Pendl, Alois Spherical curves and their analogues in affine differential geometry. Proc. Amer. Math. Soc. 48 (1975), 423–428.
In this paper the authors define a curve to be spherical in the affine sense if all its normal planes pass through a common point. If I am not mistaken these are just curves which lie on ellipsoids, but I am not immediately sure. At any rate, they obtain a very nice characterization for these affine spherical curves: $$ \left(\frac{1}{\widetilde\tau}\right)''+\frac{\widetilde\kappa}{\widetilde\tau}=0, $$ where $\widetilde\kappa$, $\widetilde\tau$ are the affine curvature and torsion and diferrentiation is with respect to affine arc length. So it seems like the most natural characterization is in terms of the affine versions of curvature and torsion.