Remembering Taylor series
As have already been said there is no golden trick here. However it is sometimes useful to know some ways to manipulate series and functions.
Suppose we know $$\frac{1}{1-x}=\sum_{k=0}^\infty x^k,\qquad|x|<1\tag{1}$$ and $$e^x=\sum_{k=0}^\infty \frac{x^k}{k!}, \qquad\text{for all $x$}\tag{2}$$
Formally if we integrate (1) we get $$-\log(1-x)=\sum_{k=0}^\infty \frac{x^{k+1}}{k+1}=\sum_{k=1}^\infty \frac{x^{k}}{k},\qquad|x|<1$$ and then $$\log(1+x)=-\sum_{k=1}^\infty \frac{(-1)^kx^{k}}{k},\qquad|x|<1$$ Computing $\arctan x$ is similar since by (1) $$(\arctan x)'=\frac{1}{1+x^2}=\sum_{k\geq0} (-1)^kx^{2k}$$
Also if we use $\sin x= (e^{ix}-e^{-ix})/2i$ in conjunction to (2) we get $$2i\sin x = \sum_{k=0}^\infty \frac{(ix)^k}{k!}- \sum_{k=0}^\infty \frac{(-ix)^k}{k!} = \sum_{k=0}^\infty \frac{i^k(1-(-1)^k)x^k}{k!}$$ now $1-(-1)^{k} = 0 $ for even $k$, and $1-(-1)^{k} = 2$ otherwise. So $$2i\sin x = 2\sum_{k=0}^\infty \frac{i^{2k+1}x^{2k+1}}{(2k+1)!} = 2i\sum_{k=0}^\infty \frac{(-1)^{k}x^{2k+1}}{(2k+1)!}$$ where in the last step we used $i^{2k+1}=i\cdot i^{2k}=i\cdot (-1)^k$, and we reach the expansion $$\sin x=\sum_{k=0}^\infty \frac{(-1)^{k}x^{2k+1}}{(2k+1)!} $$ Cosine is similar to sine.
Note that these are formal derivations - proofs needs justifications of the steps done.
The best way is to know the formula for Taylor series in general, and then to derive them from scratch when you need them. You will easily memorize them after doing that a few times.
Let's take an easy example and compute the first few terms of the series for $\cos(x)$. The general formula for Taylor series (at 0, you can look up the more general one or just use the translation $x\rightarrow (x-x_0)$) is
$$f(x)=\sum_0^\infty \frac{f^n(0)}{n!}x^n$$
We know $\cos(0)=1$, $\cos'(0)=- sin(0)=0$, $\cos''(0)=-\cos(0)=-1$, $\cos'''(0)=\sin(0)=0$, $\cos''''(0)=\cos(0)=1$, and so forth, so we get
$$\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{24}\cdots$$
and you can easily figure out the pattern if you need more terms.