Here's one instance where the answer is affirmative: when the target category is a groupoid (a little more general than my remark on John Klein's answer).

Let $\mathcal{C}$ be any category and $\mathcal{G}$ be a groupoid. Then $B\mathcal{G}$ is a 1-type (i.e., all $\pi_n$ with $n\ge 2$ vanish, with any base points), and therefore, for any space $X$, $\mathrm{maps}(X, B\mathcal{G})$ is a 1-type too, and in fact is just weakly homotopy equivalent to $B \mathrm{Fun}(\pi_{\le 1}(X), \mathcal{G})$ where $\pi_{\le1}(X)$ is the fundamental groupoid of $X$ (notice that since $\mathcal{G}$ is a groupoid, so is any functor category $\mathrm{Fun}(\mathcal{A}, \mathcal{G})$). Applying this to $X=B\mathcal{C}$, we get a weak homotopy equivalence $\mathrm{maps}(B \mathcal{C}, B \mathcal{G}) \simeq B \mathrm{Fun}(\pi_{\le 1}(B\mathcal{C}), B\mathcal{G})$. Now, $\pi_{\le 1}B \mathcal{C}$ is just $\mathcal{C}[\mathcal{C}^{-1}]$, the localization of $\mathcal{C}$ obtained by adding formal inverses for all morphisms of $\mathcal{C}$; and since $\mathcal{G}$ is a groupoid, any functor $\mathcal{C} \to \mathcal{G}$ automatically factors through $\mathcal{C}[\mathcal{C}^{-1}]$, so composition with the canonical functor $\mathcal{C} \to \mathcal{C}[\mathcal{C}^{-1}]$ induces an equivalence of categories $\mathrm{Fun}(\mathcal{C}, \mathcal{G}) \cong \mathrm{Fun}(\mathcal{C}[\mathcal{C}^{-1}], \mathcal{G})$. Equivalences of categories induce homotopy equivalences of classifying spaces, so we get a weak equivalence $\mathrm{maps}(B \mathcal{C}, B \mathcal{G}) \simeq B\mathrm{Fun}(\mathcal{C}, \mathcal{G})$, which is a little better than just saying that every function between the classifying spaces is homotopic to one coming from a functor.