This can be due to neck muscle weakness and spasm if its in the neck but the x-ray does not show the muscular problems and it occurs due to neck bending for long time/weight lifting /long travelling. But if you are having stiffness /lack of range of movement in the shoulder along with pain which aggravates specially at night, it can be a frozen shoulder problem.
Next Steps
Go to a physiotherapist.. Ultrasonic therapy +IFT +Heating therapy +some strengthening +stretching exercises will be helpful.
Health Tips
At home.. Rest +hot water fomentation +pain killer gel +no long sitting +no forward bending of neck +no cold exposure +no manual exertions +no long travelling +no side lying on same shoulder+sit tall.