Yes, if you take a polynomial-time decidable language, that language is always of the form $D_f$ for some polynomial-time computable $\{0,1\}$ valued function - because the definition of polynomial-time decidability is that the characteristic function of the language is polynomial-time computable.
The main distinction between function and decision problems in computational complexity comes from functions that are not $\{0,1\}$ valued. A number-theoretic function $f$ is computable (with no time constraints) if and only if its graph $\{ \langle x,y\rangle : f(x) = y\}$ is computable. But the graph might be polynomial-time computable even though $f$ is not.
For example, this happens when we take $f(x) = 2^x$. The problem is that when we want to decide whether a pair $\langle x,y\rangle$ is in the graph, we can work in time polynomial in $|\langle x,y\rangle|$, which is larger than both $\log(x)$ and $\log(y)$, but to try to compute $f(x)$ in polynomial time we have to bound ourselves to a time limit that is polynomial in $\log(x)$ alone. Now computing $y = 2^x$ in the naive way requires $x$ multiplications of numbers less than $y$, and $\log(y) = \log(2^x) = x$, and multiplication of two numbers less than $y$ requires time that is polynomial in $\log(y)$. So if we are allowed to take a polynomial amount of time relative to $\log(y)$ then we can verify whether $y = 2^x$, thus deciding the graph of $f(x) = 2^x$ in polynomial-time. But we cannot compute $f(x)$ from $x$ alone in polynomial time.