There are lots of different kinds of knee pain with different sources. What kind of knee pain are you having? Where does it hurt? What sort of pain? Only during running? Or also after? Does it start immediately or towards the end of the run? Have you had problems with your knees before? Do you have arthritis?
Since you mention weight gain, my first thought is "too much, too soon." But it can be lots of things.
As to when is pain too much pain. Any amount of true pain (as opposed to discomfort) is too much. It is the body's warning sign that something is wrong. Discomfort is a slightly different animal, although it too is a sign that something is wrong, but maybe not as serious.
Does the pain change the way you run (i.e. affect your gait)? If it does, stop immediately. Does it affect the way you walk or cause problems post run? That's not good either. Even if it is still in the discomfort stage, continuing to run on it without understanding what is causing the problem and talking steps to fix it can make discomfort turn into an over use injury.
Have you google'd "running knee pain"? I suggest that you do that so that you can get a better idea of what sort of pain you are having.
On the why knees hurt, they are a joint -- if they aren't aligned properly as you run (they are a hinge joint, so shouldn't be bending side to side, just up and down), that can cause problems with the components of the knee itself and / or the muscles that move it. It's a pretty complex structure. It is important that it "track" properly. That is the job of the leg muscles -- to support the knee and keep it aligned. Or if you have inflammation in the joint itself from arthritis or previous injury, that's another type of problem.
If you're not having fun, then why run?
A day without running is not a good day.
-- Haile Gebrselassie
I saw the angel in the marble and carved until I set him free.
The smallest feline is a masterpiece.
-- Leonardo da Vinci