I suppose you mean the following: Let $(\Omega, \Sigma, P)$ be a probability space and for simplicity assume that $X,Y$ take their values in $(\mathbb{R},\mathcal{B}(\mathbb{R}))$ (any other measurable spaces, even different ones for each variable would be fine). Let $P(\cdot | Y=-):\: \Sigma \times \mathbb{R} \rightarrow [0,1]$ be a measurable function for fixed first variable such that $P(\cdot | Y=-) \circ (\mathrm{id_\Sigma},Y):\: \Sigma \times \Omega \rightarrow [0,1]$ is a regular conditional probability given $Y$. Then $P(X \in \cdot | Y=-):\: \mathcal{B}(\mathbb{R}) \times \mathbb{R} \rightarrow [0,1], P(X \in A | Y=y) := P(\{X \in A\} | Y=y)$ defines the conditional distribution of $X$ given $Y=-$. And your claim is that $X,Y$ are independent iff this map is constant in the second variable.
If $X,Y$ are independent, then $$\int_{\{Y \in B\}} {P(X \in A)} \mathrm{d}P =P(X \in A) P(Y \in B) = P(X \in A, Y \in B) = \int_{\{Y \in B\}} {P(\{X \in A\} | \sigma(Y)) \mathrm{d}P}$$
for all $A,B \in \mathcal{B}(\mathbb{R})$, so by definition of the conditional probability, we have for all $A \in \mathcal{B}(\mathbb{R})$: $P(\{X \in A\} | \sigma(Y)) = P(X \in A)$ P-a.s. But then $P(\{X \in A\}|Y=-)$ can be chosen to be constant $=P(X \in A)$.
If $P(X \in \cdot | Y=-)$ is constant for fixed first variable, we must have
$$P(X \in A | Y=y_0) \cdot P(Y \in B) = \int_B {P(X \in A | Y =y)} \mathrm{d}P_Y(y) = \int_{\{Y \in B\}} {P(X \in A | \sigma(Y))} \mathrm{d}P = P(X\in A, Y \in B)$$
for all $y_0 \in \mathbb{R}$, $A,B \in \mathcal{B}(\mathbb{R})$. But then choosing $B=\mathbb{R}$, we see that $P(X \in A | Y=y_0) = P(X \in A)$, and the independence follows.