This answer is an elaboration of my comments on Paul Siegel's answer.

Atiyah showed that there is a natural bijection
$$[X,\mathcal{F}] \cong K(X)$$
whenever $X$ is a compact space. Here the left-hand side is the set of unbased homotopy classes of maps into $\mathcal{F}$. This result is proven in the Appendix to Atiyah's book K-theory.

As I'll explain, it follows from this theorem that there is an isomorphism
$$\pi_n (\mathcal{F}) \cong \widetilde{K} (S^n),$$
where $\widetilde{K}$ denotes reduced $K$-theory. So these groups are trivial for $n$ odd and infinite cyclic for $n$ even. Note that all path components of $\mathcal{F}$ are homotopy equivalent, because (as Atiyah explains) there is an associative product $\mathcal{F} \times \mathcal{F} \to \mathcal{F}$ that makes the set of path components of $\mathcal{F}$ into a group (namely the group $[\{*\}, \mathcal{F}] \cong K(\{*\}) \cong \mathbb{Z}$). So it doesn't matter what basepoint we choose for computing homotopy.

Now, to deduce the claimed calculation of homotopy groups, let $\mathcal{F}_0$ denote the index 0 Fredholm operators (which form one connected component of $\mathcal{F}$), Atiyah's bijection restricts to a bijection $[X,\mathcal{F}_0]\cong \widetilde{K}(X)$.

Next, I claim that $\mathcal{F}_0$ is simply connected. First, $\mathcal{F}_0$ is path connected by definition, so we just need to check that $\pi_1 (\mathcal{F}_0)=1$. For this, it's enough to check that each loop is (unbased) nullhomotopic, which follows from $[S^1,\mathcal{F}_0]\cong \widetilde{K}(S^1)=0$.

Now $\pi_n(\mathcal{F})=\pi_n(\mathcal{F}_0)=\langle S^n,\mathcal{F}_0\rangle \cong [S^n,\mathcal{F}_0] = \widetilde{K} (S^n)$. Here $\langle\, ,\rangle$ means based homotopy classes of (based) maps, which is the same as unbased homotopy classes when the range is simply connected (this is proven in Section 4.A of Hatcher's book Algebraic Topology, for instance).