Finding the right pillow firmness for your neck pain is based on sleeping position more than anything else. Your pillow should be just firm enough to align your spine without being stiff under your head and neck.
If you sleep on your side, a firm pillow will be best for alleviating neck pain. Conversely, back sleepers do best with medium or medium-firm pillows while stomach sleepers need soft pillows.