The short answer is yes it absolutely can be and here's one of the possible reasons why...
If you're wearing footwear that's not right for your feet, that can be one of the contributors to knee pain. This does not mean that fixing your footwear is going to be the complete fix. However, it is absolutely a common contributor to knee pain.
Here's how that works...
Your feet are at the end of your leg. If you have flat feet (pes planus), which means your feet want to roll inward, then that changes what happens at your knees because it's going to make you a little knock-kneed and make you toe-off a little differently, which in turn means that your knee twists or rotates one way or the other every step you take.
So, if you're flat-footed for example, and your shoes don't support your feet and keep them level, it can force strain the inside of your knee and give various knee issues.