Let $R$ be the radius of the sphere and let $h$ be the height of the cylinder centered on the center of the sphere. By the Pythagorean theorem, the radius of the cylinder is given by
$$
r^2 = R^2 - \left(\frac{h}{2}\right)^2.
$$
The volume of the cylinder is hence
$$
\begin{align}
V &= \pi r^2 h\\
&= \pi \left(h R^2 - \frac{h^3}{4}\right).
\end{align}
$$
Differentiating with respect to $h$ and equating to $0$ to find extrema gives
$$
\frac{dV}{dh}=\pi \left(R^2 - \frac{3h^2}{4}\right) = 0\\
\therefore h_0 = \frac{2R}{\sqrt{3}}
$$
The second derivative of the volume with respect to $h$ is negative if $h>0$ such that the volume is maximal at $h = h_0$. Substituting gives
$$
V_{max}=\frac{4 \pi R^3}{3\sqrt{3}}.
$$