The ability to feel may not be exclusive to humans and animals. It never was, we just didn't know or didn't want to acknowledge that even plants may have a pain response in their bodies.
As a kid mimosa plants were abundant in open lots where I used to play with friends. We fought over who could kick at the plant or blow air at it to cause its leaves to fold up. Back then I already had a sense that those plants feel, though maybe not in the same way that humans feel. Pain is often coupled with fear, that's why many people, myself included, are afraid to go to the dentist. A previous encounter with fire makes me cautious when handling the element.
But as for plants, pain maybe serves as an alarm of sorts--to defend oneself, to repair "wounds" from scratches and breaks, to regenerate lost parts and, for some carnivorous types, to catch prey... I can only guess the function of pain in plants, but it's definitely not the same with animals and people who have the anatomy to run/move away.
The Smithsonian presents an interesting experiment that may have people rethinking ethics (*ehem vegetarianism*) very soon.
The video can't be embedded but it's here: http://www.smithsonianchannel.com/videos/do-plants-respond-to-pain/12151