Can happen. Depending in the surgical procedure you had and the position in which you were placed for the procedure, the shoulder may become sore afterwards. Symptoms usually improve after a short period of time and with a little physical therapy.
Maintain motion. After hand surgery, it can be natural to protect the hand and arm. Many patients stay in a sling, or keep the arm close to their body. This can lead to pain and stiffness in the shoulder. Make sure you are keeping the shoulder moving and add stretches if it feels tight.
Not abnormal. Depending on the kind of surgery you had, you may have had to use the arm in a different manner than usual, which put different stresses on your shoulder than usual. This is a common situation and it should improve as you begin to use your hand more normally.