For a normed space $E$, let $\Phi_E \colon E \to E^{\ast\ast}$ denote the canonical embedding. The key to the following is the identity
$$\Phi_Y \circ T = T^{\ast\ast} \circ \Phi_X\tag{1}$$
for all $T \in B(X,Y)$. So we have $T^{\ast\ast}(\Phi_X(X)) \subseteq \Phi_Y(Y)$ and find the necessary condition
$$S^{\ast}(\Phi_X(X)) \subseteq \Phi_Y(Y)\tag{2}$$
for $S\in B(Y^{\ast}, X^{\ast})$ to be the transpose of some $T\in B(X,Y)$.
We note that $(2)$ is also sufficient for the existence of a $T$ with $S = T^{\ast}$, using $(1)$ we can then define $T = \Phi_Y^{-1} \circ S^{\ast} \circ \Phi_X$. It is a routine verification that $T$ is then a well-defined continuous linear operator with $T^{\ast} = S$.
Hence there always is such a $T$ if $Y$ is a reflexive Banach space or $X = \{0\}$.
If $Y$ is not reflexive and $X \neq \{0\}$, we can construct an $S\in B(Y^{\ast}, X^{\ast})$ that isn't a transpose by choosing an $\eta \in Y^{\ast\ast}$ and a $\xi \in X^{\ast}\setminus \{0\}$, and setting
$$S(\lambda) = \eta(\lambda)\cdot \xi.\tag{3}$$
For $S^{\ast}$, we find that
$$S^{\ast}(\psi) = \psi(\xi)\cdot \eta.\tag{4}$$
Since $\xi \neq 0$, there is an $x\in X$ with $\xi(x) \neq 0$, and then we have
$$S^{\ast}(\Phi_X(x)) = \Phi_X(x)(\xi)\cdot \eta = \xi(x)\cdot \eta \notin \Phi_Y(Y),$$
so $S$ cannot be the transpose of any $T\in B(X,Y)$.