David Carlisle explained why \hspace{0pt} makes such a difference. I'd like to explain how one could change the behaviour of accents over \mathcal{C} so that they're not that much off to the right. In fact, I'd go as far as to say that there's an error in the font metrics of the \mathcal font cmsy10. My solution works on UNIX type systems; here's a comparison of the unpatched versus patched font metrics.

I think that the patched version in the right looks much better. To produce the patched font metrics, run the following shell script in your current TeX directory:
for i in 5 6 7 8 9 10
do tftopl $(kpsewhich cmsy$i.tfm) |
sed '
/(LABEL O 103)/d
/(LABEL O 104)/a\ \ \ (LABEL O 103)' > modcmsy$i.pl
pltotf modcmsy$i.pl
rm modcmsy$i.pl
done
This will produce 6 files modcmsy5.tfm to modcmsy10.tfm. (If you think that the accents are still too far to the right, replace 104 with 113 in the shell script¹.) Now the LaTeX file
\documentclass[12pt]{article}
\DeclareFontShape{OMS}{cmsy}{m}{n}{%
<5><6><7><8><9><10>gen*modcmsy%
<10.95><12><14.4><17.28><20.74><24.88>modcmsy10%
}{}
\pdfmapline{+modcmsy5 CMSY5 <cmsy5.pfb}
\pdfmapline{+modcmsy6 CMSY6 <cmsy6.pfb}
\pdfmapline{+modcmsy7 CMSY7 <cmsy7.pfb}
\pdfmapline{+modcmsy8 CMSY8 <cmsy8.pfb}
\pdfmapline{+modcmsy9 CMSY9 <cmsy9.pfb}
\pdfmapline{+modcmsy10 CMSY10 <cmsy10.pfb}
\usepackage{amsfonts}
\begin{document}
$\dot{\mathcal C}$ $\tilde{\mathcal C}$ $\widehat{\mathcal C}$
\end{document}
will produce as output the right part in the above image, and the accent correction will work for all font sizes. (Thanks, egreg, for telling me about \pdfmapline!) Personally, I don't like the \widehat from amsfonts so much, so I'd just omit \usepackage{amsfonts} if possible:

¹Just a short explanation: 103 (octal number!) is the position of \mathcal{C} in the font. In the original font metrics, accents over \mathcal{C} are shifted to the right by the same amount as over \mathcal{B}. In the patched version it's the same as over \mathcal{D} (104 in base-8); the alternative 113 corresponds to \mathcal{K}.
$\dot{f}\qquad\dot{\hspace{0pt}f}$then it is clear to see why TeX uses the italic slope as the dot appears to fall off the back of the f if just centered over its bounding box. TeX does not have information about the letter shape, only metric information so it has to make decisions based on that which will inevitably work better for some letter shapes than others. – David Carlisle Mar 07 '12 at 09:24\mathcal{C}, namely, the accent is shifted by 13.89% of the design size (fromcmsy10.pl:CHARACTER O 103hasKRN O 60 R 0.138893). I think this also looks bad for\hat{\mathcal{C}}. Yes, the hat has to be shifted, but not that much. – Hendrik Vogt Jun 13 '12 at 14:46