When a honey-bee stings a person, it injects an acidic liquid into the body which causes pain and irritation. Thus, rubbing a mild base like baking soda solution on the stung area gives relief, as it neutralises the acidic liquid injected by the bee.
But when a wasp stings a person, it releases an alkaline liquid into the skin. Thus rubbing with mild acid like vinegar on the affected area gives relief.