It is not clear what kind of lung infection
you had, has it been treated adequately or it still lingers? The chest pain
could be because of involvement of pleura
in the infection and the radiated pain on rt side of neck(is it neck or shoulder?) could be if diaphragmatic pleura is involved. If lungs are healthy then there can be other causes for pain. Consult your pulmonologist/family physician for further advice.