Pain does not define right and wrong. If I drive in both lanes, No one is in pain or because hurt but is wrong by the law. If I throw rocks onto my neighbors law, it doesn't cause pain, however it is wrong to do. Pain is a product of actions down in performing acts that are right or wrong but doesn't define it.
No, pain is not what genuinely defines right and wrong, because sometimes the right thing is not the most comfortable. Giving something up so that another person can have it is not comfortable, but it helps someone else. Sometimes, what is comfortable to you is something that hurts or kills someone else, but that does not make it right. Pain and justice are different things.