It could be from several different things, and which joint they are on can make a difference.
This is very common the the distal interphalengeal joint (DIPJ) to be affected by osteoarthritis. These joints then develop osteophytes, or bone spurs, around the edges of the joint. These bumps are often called Heberden's Nodes and they can be painful if bumped.
A disorder that goes along with the arthritic changes in the DIPJ that can cause a bump is a mucus cyst. A mucus cyst is a small ganglion cyst that comes off of the DIPJ. These too, can be painful if hit.
The other joints of the fingers can also be affected by arthritis, though the type is usually of a different type. The proximal interphalangeal joint (PIPJ) are more commonly affected by psoriatic arthritis and the metacarpalphalangeal joint (MCPJ) are more affected by rheumatoid arthritis. But, this is in general, and not hard and fast.
Rheumatoid arthritis patients can also develop nodules on the fingers, as can patients who have gout.
So, as you can see, there are many reasons for bumps on the fingers. If the bumps continue to bother you, you should have them examined by a hand surgeon.
I developed the same symptoms a year ago and was diagnosed as osteoarthritis which was alarming so I went about checking out what I was doing wrong and realized that I was drinking too much coffee so I gave it up completely and the condition subsided, no more pain and movement of fingers came back to normal and the bumps seem to disappear slowly.