Hello,
I'm assuming your function f is real valued.
One often useful notion of Taylor expansion then is to consider f(R_x(v)) for small v in the tangent space at x, where R_x maps that tangent space to M: it's a retraction, such as the exponential map for example.
If the retraction is second order (which is the case for the exponential map) we can write:
f(R_x(v)) = f(x) + <grad f(x), v> + (1/2) <Hess f(x)[v], v> + O(||v||³)
Manopt can help you with computing the Riemannian gradient and Hessian for many manifolds.
Is this the type of Taylor expansion you had in mind?
Best,
Nicolas