Consider the poset of closed subsets of $[0,1]$. Let $a=\{0,1\}$ and $b(r)=[0,r]$ for $r<1$. Then the (directed) colimit of the $b(r)$ is $b=[0,1]$, and the product (i.e., intersection) of $b$ and a is $a$. However, the colimit of the products of the $b(r)$ with $a$ is $\{0\}$.
In the Elephant, Theorem B2.6.8 shows that finite limits commute with filtered colimits in $\mathsf{Set}$ using arguments that can apparently be internalized to any $\mathcal{S}$ which is Barr-exact with reflexive coequalizers. Let's call such a category good.
I expected Johnstone's proof to be a straightforward internalization of the proof found, say, in Mac Lane. But in fact he relies on reducing preservation of pullbacks to preservation of binary products, as Buschi Sergio attempted to do in his answer. Johnstone reduces from statement 1 to statement 2 as follows:
For any good category $\mathcal{S}$, and any $\mathbb{C} \in \mathrm{Cat}(\mathcal{S})$ which is internally filtered, the functor $\varinjlim: [\mathbb{C},\mathcal{S}] \to \mathcal{S}$ preserves pullbacks.
For any good category $\mathcal{S}$, and any $\mathbb{C} \in \mathrm{Cat}(\mathcal{S})$ which is internally filtered, the functor $\varinjlim: [\mathbb{C},\mathcal{S}] \to \mathcal{S}$ preserves binary products.
Johnstone proves statement (2) directly, but if we're willing to assume that $\mathcal{S}$ is cartesian closed, then I suppose statement (2) will follow in a more conceptual manner by internalizing the argument from the question statement.
Johnstone proves statement (1) from statement (2) as follows; I'll omit the word ``internal" a lot. Think of $[\mathbb{C},\mathcal{S}]$ as the category of discrete opfibrations over $\mathbb{C}$. Consider a pullback $\mathbb{G} \times_{\mathbb{F}} \mathbb{H}$ over the discrete opfibration $\mathbb{F} \to \mathbb{C}$. Then $\mathbb{G}$ and $\mathbb{H}$ can be regarded as discrete opfibrations over $\mathbb{F}$ in the slice category $\mathcal{S}/\pi_0 \mathbb{F}$, and $\mathbb{G}\times_\mathbb{F} \mathbb{H}$ is their product as such. Now, $\mathbb{F}$ is weakly filtered (meaning its connected components are filtered) over $\mathbb{S}$ by Johnstone's Lemma B2.6.7 (being a discrete opfibration over a filtered category), so it is filtered internally to $\mathbb{S}/\pi_0\mathbb{F}$ by Johnstone's Corollary B2.6.6. Hence, since $\mathcal{S}/\pi_0\mathbb{F}$ is again a good category, we can apply statement (2) to deduce that the product $\mathbb{G}\times_\mathbb{F} \mathbb{H}$ is preserved by the colimit functor $\varinjlim:[\mathbb{F},\mathcal{S}/\pi_0\mathbb{F}] \to \mathcal{S}/\pi_0\mathbb{F}$: $\varinjlim(\mathbb{G}\times_\mathbb{F} \mathbb{H}) \cong \varinjlim(\mathbb{G}) \times \varinjlim(\mathbb{H})$. When we apply the forgetful functor $\mathcal{S}/\pi_0\mathbb{F} \to \mathcal{S}$ to this isomorphism, colimits are preserved and products become pullbacks over $\pi_0 \mathbb{F}$, so it says
$\varinjlim(\mathbb{G}\times_\mathbb{F} \mathbb{H}) \cong \varinjlim(\mathbb{G}) \times_{\pi_0 \mathbb{F}} \varinjlim(\mathbb{H}) = \varinjlim(\mathbb{G}) \times_{\varinjlim( \mathbb{F})} \varinjlim(\mathbb{H})$
as desired. Note that in order to use the soft proof of (2), though, we need the slice category of $\mathcal{S}$ to be cartesian closed, i.e. we need $\mathcal{S}$ to be locally cartesian closed in addition to being good.
Some thoughts:
In the direction of making this more self-contained, it looks like this proof could be stripped down to avoid reliance on internal logic if we just want it to apply when $\mathcal{S} = \mathsf{Set}$ -- although it looks like we will still have to think about categories internal to slices of $\mathsf{Set}$, this shouldn't be too bad. I'm not sure how ``soft" this is, though.
In the direction of looking for maximum generality, this theorem identifies a nice class of categories where an internal version of finite limits and filtered colimits commute. But Question 2 asked for a nice class of categories where honest-to-goodness external finite limits commute with filtered colimits. I'm less sure about how to use this theorem to identify such a class. If $\mathcal{S}$ admits a geometric morphism to $\mathsf{Set}$ (or something along these lines), then ordinary small categories can be turned freely into internal categories in $\mathcal{S}$. Would such a functor also turn discrete opfibrations into discrete opfibrations? And would it preserve notions of limit and colimit? These are change-of-base questions that someone out there surely knows...
It sure would be nice to modify this proof or find another proof which explicitly exploits the definition of filteredness of $\mathbb{C}$ which says that the diagonal functor $\Delta: \mathbb{C} \to [\mathbb{I},\mathbb{C}]$ is final for every finite $\mathbb{I}$.
Best Answer
Here's a dumb counterexample. If C is an abelian category, so is Cop. In Cop, filtered colimits are filtered limits in C. And, of course, there are many examples of abelian categories (such as abelian groups) where filtered limits aren't exact.
Of course, your question is really: when is an abelian category C sufficiently close to Set, so that we can ratchet up the fact that filtered colimits are exact in Set to a proof for C.
Any category of sheaves of abelian groups on a space (or on a Grothendieck topos) will have exact filtered colimits, for instance.