Parenting mesh with armature deformation problem
I think this answer needs to be advises about parenting (even if I am not specialist on that, so please provide another answer or comment if I say wrong).

All that will be indicated below is not mandatory but it will at least simplify your life.

Here is the model from the first upload :



We can notice 4 things that are to avoid (except for particular cases):

1 - The armature is out of the mesh: that will lead to distortions

2 and 3 - Rotation and scale may lead to unpredictable results: so apply them using CtrlA and choose 'rotation and scale'

Y - The model is left/right aligned on the Y axis: Blender is much more easy and provides functions if the model (and armature) is left/right along the X axis

Concerning the second upload, things are better (rotation and scale are ok, the armature is more inside the mesh, but still along Y). If we 'X-ray' to see the armature inside the mesh:




The armature is visibly not symmetrical (close to but not exactly)
The bones are misplaced. Here the point is to imagine where the real bones should be in a real human being


For instance, shoulders are too short, nearly all arm articulations are not at the good place (shoulder, elbow, wrist), femoral neck is in the belly.

Going between object and edit mode, we can see that the mesh shifts (frame 0). Which is annoying because there is no clear 'rest pose'. The rest pose is a reference pose which has no transformation (the skeleton in rest pose is the same in edit mode and in pose mode).

Now about the animation :

Here are the rotations at frame 1 for the upper leg



The value are a bit strange (-99, 20, -16)... and if we reproduce just that from the rest pose :



So somewhere, a parent bone of the upper leg needs to be in a compensating/distorted position. And that surely why your mesh looks as in your question.

Some advices:


Use X-ray to see where are the bones
Look at the bone names (check 'names' in the armature object display properties). Particularly, names 'need' to indicate left/right for symmetrical bones (Blender will recognize them when names are suffixed or prefixed by Left Right):





Use the symmetry along X axis (and the names above). That allow to place (in edit mode) a given bone and then just ask to Blender to place its symmetrical :





Look at the bone position from several axis (eg. front, right, top) to verify the bones placement
Place the bones heads/tails at the good position regarding the mesh shape and the mesh geometry. The mesh geometry will lead is bending is ok or not, depending on the edge loops it forms:


Here an example showing the mesh with wire and the approximate position for the shoulder articulation



Hope that helps.