Running shoes offer comfortable support to your feet and ankles, help distribute your weight during a run, and reduce friction to minimize the chance of blisters forming. Whenever your shoes stop providing you the proper support that you need while running, it's definitely time to replace your shoes.
If you notice that your soles are not evenly distributed, it is time to find a new pair of shoes.
However, if your shoes are relatively new and you are still experiencing pain, consider trying a different shoe size, since a shoe that is too big or too small can certainly cause pain during and after a run.