Let $X$ be a random variable with pdf $p(x)$, and let $Y$ be a constant whose pdf can be regarded as $p(y) = \delta(y-Y)$, where $\delta(\cdot)$ is the Dirac-delta function.
Then, $p(x, y) = p(x|y)p(y) = p(x|y)\delta(y-Y) = p(x|Y)\delta(y-Y)$. Since $\int p(x, y) dy = p(x)$, we have $p(x) = \int p(x, y) dy = \int p(x|y)\delta(y-Y) dy = p(x|Y)$, which means $p(x|Y) = p(x)$.
Therefore, we have $p(x, y) = p(x)\delta(y-Y) = p(x)p(y)$, and $X$ and $Y$ are independent.
I am not sure if I am right. If you could give me some references (maybe some books on degenerate distributions), that will be better, and thanks very much in advance!
Well, $p(x\mid Y)=p(x)$ does not mean $p(x\mid y)=p(x)$. In fact, $p(x\mid y)$ is undefined when $y\neq Y$ (though it is often convenient to say it is $0$).
Still, that does indicate that: $$p(x,y)=\begin{cases}p(x\mid Y)p(y) &:& y=Y\\ 0 &:& y\neq Y\end{cases} = p(x)p(y)$$
Which is all you need.