It looks as if you're working over $\mathbb Q$. And you are using an elliptic curve in which all of the 2-torsion is rational, so $E[2]$ is isomorphic to (say) $\boldsymbol\mu_2^2$ as a Galois module, where $\boldsymbol\mu_2=\{\pm1\}$ is the group of square roots of 1. Okay, now consider the injection (this comes from basic Kummer theory of elliptic curves)
\begin{align*}
E(\mathbb Q)/2E(\mathbb Q) &\hookrightarrow
H^1(G_{\overline{\mathbb Q}/\mathbb Q},E[2]) \\
&\cong H^1(G_{\overline{\mathbb Q}/\mathbb Q},\boldsymbol\mu_2^2) \\
&\cong H^1(G_{\overline{\mathbb Q}/\mathbb Q},\boldsymbol\mu_2)^2 \\
&\cong \mathbb Q^*/(\mathbb Q^*)^2\times \mathbb Q^*/(\mathbb Q^*)^2.
\end{align*}
(The final isomorphism is standard Kummer theory.) So this at least tells you that whether $P$ is in $2E(\mathbb Q)$ should depend on whether certain values are squares. If you trace through all of the maps, which requires choosing a basis for $E[2]$, you'll find (for one of the choices) that it is given by
$$ P \longmapsto \bigl(x(P),x(P)-d\bigr), $$
so $P$ is in $2E(\mathbb Q)$ if and only if both $x(P)$ and $x(P)-d$ are squares.
Of course, from the equation of $E$, any two of $x(P)$, $x(P)-d$ and $x(P)+d$ being a square forces the third one to also be square. Finally, if $x(P)=0$ or $x(P)=d$, one finds during the analysis that one needs to use a different formula. For example, since $x$ and $(x-d)(x+d)$ differ multiplicatively by a square, one has
$$ 0 \longmapsto (-d^2,-d) = (-1,-d) \in \mathbb Q^*/(\mathbb Q^*)^2\times \mathbb Q^*/(\mathbb Q^*)^2.
$$

To answer your second question, if $E[m]\subset E(K)$, then one similarly gets an injection
$$ E(K)/mE(K) \hookrightarrow K^*/(K^*)^m\times K^*/(K^*)^m, $$
so (more or less) there are rational functions $f$ and $g$ in $K(E)$ such that for $P\in E(K)$ we have
$$ P \in mE(K) \;\Longleftrightarrow\;
\text{$f(P)$ and $g(P)$ are $m$'th powers in $K^*$.}
$$