It is most likely a pulled muscle or a pinched nerve in the spine. The pinched nerve can be caused by simple posture problems and is called referred pain.
It could be caused by any number of things. It might be a pinched nerve, a strained ligament, or an issue with the rotator cuff. Ice it and take an anti-inflammatory. If it doesn't go away, see a doctor.