We determine the time dependence of pressure and shear stress distributions on the surface of a pitching and deforming hydrofoil from measurements of the three dimensional flow field. Period-averaged stress maps are obtained both in the presence and absence of steady flow around the foil. The velocity vector field is determined via volumetric three-component particle tracking velocimetry and subsequently inserted into the Navier-Stokes equation to calculate the total hydrodynamic stress tensor. In addition, we also present a careful error analysis of such measurements, showing that local evaluations of stress distributions are possible. The consistency of the force time-dependence is verified using a control volume analysis. The flapping foil used in the experiments is designed to allow comparison with a small trapezoidal fish fin, in terms of the scaling laws that govern the oscillatory flow regime. As a complementary approach, unsteady Euler-Bernoulli beam theory is employed to derive instantaneous transversal force distributions on the flexible hydrofoil from its deflection and the results are compared to the spatial distributions of hydrodynamic stresses obtained from the fluid velocity field.