The zero, one, and three dimensional spheres $S^0$, $S^1$ and $S^3$ are in bijection with the sets $\{a\in \mathbb{K}:|a|=1\}$ for $\mathbb{K} = \mathbb{R}, \mathbb{C}, \mathbb{H}$ respectively. The real, complex and quaternionic multiplication therefore provide a group operation on these spheres.
This is mentioned in the book: Kristopher Tapp (2011), Matrix Groups for Undergraduates, Indian Edition, pp. 40.
Following this there is a statement:
It turns out that $S^0$, $S^1$ and $S^3$ are the only spheres which are also groups.
Can someone please clarify this statement? How are these three the only spheres which are also groups?
For example, I could take any sphere $S^k$ ($k\ge 1$) and get a bijection $f:S^k \to S^1$ and define a binary operation on $S^k$ by $$a*b = f^{-1}(f(a)\cdot f(b))$$ and $S^k$ would be a group under this operation.
So what exactly is meant by the above statement? In what sense are these the only three spheres which are also groups?
The highlighted statement in your question means that the only spheres with group structures compatible with their smooth structure (i.e. multiplication by any fixed element and taking inverse are smooth) are $S^0$, $S^1$ and $S^3$. In other words the only spheres which are also Lie groups are those three spheres (for otherwise, any spheres can be made a group by means of a set theoretic bijection between the sphere and $(S^1, \cdot)$, as you rightly pointed out).
That $S^0$, $S^1$ and $S^3$ are the only spheres with smooth group structure (i.e. Lie groups) can be deduced using Chevalley-Eilenberg's Lie algebra cohomology. We may first limit our search for spheres with Lie group structure to $S^n$ for $n>1$ as we already know $S^0$ and $S^1$ are Lie groups. If $S^n$ is a Lie group, then it is a compact and simply-connected one and hence must be semi-simple. It is known that cohomology of a compact Lie group $G$ is isomorphic to the Lie algebra cohomology of $\mathfrak{g}$, and that if $\mathfrak{g}$ is semisimple, then $H^3(\mathfrak{g}, \mathbb{R})\neq 0$ (a 3-form which represents a nonzero third Lie algebra cohomology class is $\alpha(X, Y, Z)=\langle X, [Y, Z]\rangle$, where $\langle, \rangle$ is the Killing form). Thus $H^3(S^n)\neq 0$ and $n$ must be 3. As it turns out, $S^3\cong SU(2)$.