In order for pain to be felt, there would have to be nerves in the organism and a brain for the nerves to send messages to, then the brain would have to be large enough to comprehend the messages which is why most fish don't feel pain, they're brain is too small and simple. And from that meme that was on the front page yesterday, plants do send chemical messages when being picked or torn, but only to through their roots and cells to give information of missing parts that need to be grown back. Plants however, can respond to stimuli such as sunlight and a fly nearby but it doesn't mean they have they capability of pain.