This pain could indicate an issue with your sciatic nerve. Or it might be caused by arthritis in the knee, a torn meniscus (knee), or referred paid from elsewhere.
Pain of the sciatic nerve, commonly called sciatica, can be caused by sitting on a wallet, sitting on your feet, carrying a toolbelt, or even pregnancy.
Possibly a back injury. Something like a herniated disk can pinch the nerves running down the legs, causing pain in legs that's not related to anything in the legs.