The reason $\ln(x)$ is chosen is this:
(Note: where I say $B_{t}$ I mean Brownian motion, which you denoted in your question as $W_{t}$)
The SDE you provided is one of the few we can explicitly solve. I'll talk about Geometric Brownian Motion (GBM) $dX_{t} = \mu X_{t} \,dt + \sigma X_{t} \,dB_{t}$, but as you mentioned in your question, your case is the same when $\mu$ becomes a function of $t$.
You can "multiply" the stochastic differential equation (SDE) in its differential form by $\frac{1}{X_{t}}$ to get $$\frac{1}{X_{t}}dX_{t} = \frac{1}{X_{t}}\mu X_{t} \,dt + \frac{1}{X_{t}}\sigma X_{t} \,dB_{t} $$
and this simplifies to $$ \frac{1}{X_{t}}dX_{t} = \mu \,dt + \sigma \,dB_{t}.$$
Notice that the right hand side no longer depends on $X_{t}$. Now recall Ito's formula for a $C^{2,1}$ function $f(t,x)$ ($C^{2,1}$ means $f$ is twice differentiable in $x$ and once differentiable in $t$). Ito's formula tells us if $X_{t}$ satisfies the previous SDE, then $f(t,X_{t})$ will satisfy:
$$d(f(t,X_{t})) = \frac{\partial f}{\partial t}(t,X_{t}) \,dt + \frac{\partial f}{\partial x}(t,X{t}) \,dX_{t} + \frac{1}{2} \frac{\partial^{2} f}{\partial x^{2}}(t,X_{t}) \,d[X]_{t}$$
where $[X]_{t}$ is the quadratic variation process of $X_{t}$. Notice that in the SDE given to us by Ito's formula, one of the terms on the right hand size is $\frac{\partial f}{\partial x}(t,X{t}) \,dX_{t}$. This almost looks like our $\frac{1}{X_{t}} \,dX_{t}$, which was the left hand side of our original SDE. If we can choose $f(t,X_{t})$ wisely such that these are equal (i.e., such that $\frac{\partial f}{\partial x}(t,X{t})= \frac{1}{X_{t}}$, then we can solve this special SDE.
Hopefully you see that we should have $f(t,x) = \ln(x)$ for the above equality to hold. Okay, so since $f$ doesn't depend on $t$, let's call it $f(x)$ to save space. Substituting this $f$ into Ito's formula above gives:
$$d(\ln(X_{t})) = 0 \,dt + \frac{1}{X_{t}} \,dX_{t} - \frac{1}{2} \frac{1}{X_{t}^2} \,d[X]_{t}$$
Hmm... on the right hand side there is conveniently a $\frac{1}{X_{t}} \,dX_{t}$ (which was the whole point! That's why we choose $f$ as we did) and we have an SDE for this already. We have that $\frac{1}{X_{t}}dX_{t} = \mu \,dt + \sigma \,dB_{t}$.
Okay, so solving for $\frac{1}{X_{t}}\,dX_{t}$ in the Ito's formula SDE gives
$$\frac{1}{X_{t}} \,dX_{t} =d(\ln(X_{t})) + \frac{1}{2} \frac{1}{X_{t}^2} \,d[X]_{t} $$
and this allows us to set the right hand side of the above equal to $\mu \,dt + \sigma \,dB_{t}$. So we have $$d(\ln(X_{t})) + \frac{1}{2} \frac{1}{X_{t}^2} \,d[X]_{t} = \mu \,dt + \sigma \,dB_{t}. $$
What is $d[X]_{t}$? If you do the computation, you get $\sigma^{2} X_{t}^{2} \,dt$, so that our equation becomes $$d(\ln(X_{t})) + \frac{1}{2} \sigma^{2} \,dt = \mu \,dt + \sigma \,dB_{t}. $$
This simplifies to $$\ln(X_{t}) = \ln(X_{0}) + \int \limits_{0}^{t}(\mu - \frac{1}{2} \sigma^{2}) \,dt + \int \limits_{0}^{t}\sigma \,dB_{t} $$
so that $X_{t} = X_{0}e^{\int \limits_{0}^{t}(\mu - \frac{1}{2} \sigma^{2}) \,dt + \int \limits_{0}^{t}\sigma \,dB_{t}}$.
The SDE is a particular example of a so-called linear SDE
$$dX_t = (\alpha(t)+\beta(t) X_t) \, dt + (\gamma(t)+\delta(t) X_t) \, dW_t \tag{1}$$
where $\alpha, \beta,\gamma,\delta$ are deterministic functions. Such linear SDEs can be solved explicitly, and you can find formula for the solution for instance in the book Brownian motion - An Introduction to Stochastic Processes by Schilling & Partzsch. The idea is to solve first the homogeneous SDE
$$dX_t = \beta(t) X_t \, dt + \delta(t) X_t \, dW_t$$
and then to use a "variation of constants"-approach, see this question. For the particular case that $\alpha=\beta=0$ the solution to $(1)$ is given by
$$X_t = \exp \left( M_t \right) \left[ X_0 + \int_0^t \exp(-M_s) \gamma(s) \, dW_s - \int_0^t \exp(-M_s) \gamma(s) \delta(s) \, ds \right]$$
where
$$M_t := \int_0^t \delta(s) \, dW_s - \frac{1}{2} \int_0^t \delta(s)^2 \, ds.$$
Plugging in $\delta(t) = \sqrt{t}$ and $\gamma(t) = \sqrt{t} \sin t$ gives the solution to the SDE
$$dX_t = \sqrt{t} (X_t+\sin t) \, dW_t. \tag{2}$$
You can use the approach, which I mentioned above, to "reprove" the formula for the solution, i.e. first solve the SDE
$$dX_t = \sqrt{t} X_t \, dW_t$$
and then use the "variation of constants"-approach to obtain the solution to $(2)$.
Best Answer
Hints: