Yes if the person is contagious with pneumonia you too can catch the pneumonia from the person if you kiss them.
The Pneumonia can be caught through contact with the infected persons saliva so if someone has pneumonia you should avoid kissing that person until the pneumonia is gone and the person is no longer contagious with pneumonia.
If you or someone has strep throat it can also lead to pneumonia so avoid kissing when you have any contagious viruses or conditions until that virus or condition is gone to avoid catching it.