A basic knee muscles overview
Several muscles cross the knee, to provide dynamic control and stability.
Hamstrings and quadriceps are key muscles with our gait. The main reason being most of the movement happening in a sagittal plane.
The first group of muscles acts during the swing phase, for an eccentric control of our knee extension. It prepares for the heel strike. Weak hamstrings reduce our hip extension at toe-off.
During the stance phase, the hamstrings stabilize the knee, maintaining the best position of the tibia relative to the femur. They can also be seen as dynamic synergists to our ACL, preventing anterior translation of the tibia and reducing shear forces on the ligament.
During the stance phase, they do overall less than our quadriceps. You still need strong hamstrings for both take-off and landing, basically.
The side parts of our quadriceps, or vastus medus and lateralis, are very active throughout most of the midstance.
Other muscles help to stabilize transverse - side to side - planes of motion of the knee.
As in many other circumstances, the weakness of one group relative to the other will create an imbalance in muscle use, potentially leading towards overuse injuries.