What happens when $X$ is a single point? Then we obtain Hilbert spaces $H,K$ and a bounded linear map $T:H\rightarrow K$ which has closed range. Can we turn $H/\ker T$ into a Hilbert space? To do this, we need an inner-product on $H/ker T$; the naive definition would be
$$ (x+\ker T|y+\ker T) = (x|y) $$
but of course this is not remotely well-defined. In an attempt to make it well-defined, we probably need to have a "distinguished" way to represent an equivalence class $x+\ker T$. Using the "projection theorem" any $x\in H$ can be written as $x_0 + x_1$ where $x_0\in\ker T$, $x_1\in (\ker T)^\perp$; of course $(x_0|x_1)=0$. Then represent $x+\ker $ by $x_1$, and define
$$ (x+\ker T|y+\ker T) = (x_1|y_1). $$
This then works. Indeed, all we have done is to write $H$ as the orthogonal direct sum $\ker T \oplus (\ker T)^\perp$ and then to identify $H/\ker T$ with $(\ker T)^\perp$. We hence convert the consideration of quotients to the consideration of subspaces, and subspaces of a Hilbert space are themselves Hilbert spaces.

(I wonder if there is a good textbook which takes this point of view?)

With $X$ general, it is usual to consider only *adjointable* maps $T:H\rightarrow K$, that is, as assume the existence of $T^*:K\rightarrow H$. This is not automatic: let $H=C(X)$ and let $Y\subseteq X$ be closed non-empty with dense complement and let $K=\{f\in C(X) : f(y)=0 \ (y\in Y) \}$. If $T:K\rightarrow H$ is the inclusion, then you can check that if $T^*$ existed then $T^*(1)=1\not\in K$ a contradiction.

The problem we'll run into is that for a Hilbert C$^*$-module we do not have orthogonal decompositions. For example, with the example above, $K^\perp=\{0\}$ in $H$ but of course $K\not=H$.

A theorem of Miščenko says that if $T:H\rightarrow K$ is adjointable with closed range, then $\ker T$ is complemented: we have infact that $\ker T \oplus \operatorname{im}(T^*) = H$. Thus we can identify $H/\ker T$ with $\operatorname{im}(T^*)$ and proceed as in the Hilbert space case.

Here I have been following Lance's loverly little book "Hilbert $C^*$-modules: A toolkit for operator algebraists".

1more comment