It's a medical condition that affects the nerves, muscles, or bones can also cause this. You may have broken finger, pour fingers has the higher risk of injury of all parts of the hands because this is what we use most all the time when handling stuff. Our fingers is the workaholic in most parts, imagine holding a pen, glasses, typing in a keyboard, closing the door, keys, lock and opening something, etc.
The pain maybe also be the reason of the carpal tunnel syndrome, it is the compression of the median nerve as it passes into the hand. The median nerve provides sensation to our thumb, index finger, long finger, and pert of the ring finger. Carpal syndrome can occur in one or both of your hands. The reason for the carpal tunnel syndrome is due to excess pressure in your wrist and on the median nerve. Some conditions that can link to carpal tunnel syndrome are diabetes, thyroid dysfunction, fluid retention, high blood pressure, autoimmune and fractures.
Best thing to do is visit your nearest doctor and they can provide you some physical hand exercise or other can detect what other reason or causing the pain. Get check early before it can do further damage that you never knew.