Why do some people bond with their captors and vice versa? Why do some people in hostage and/or kidnapping situations end up identifying with their captors, and vice versa? 

Are there certain triggers or aspects of the situation that make it more or less likely to occur?
What you are describing is a condition popularly known as the Stockholm Syndrome. It should be noted that very little research has been conducted into this condition, and it has not been classified as a disorder. However, very briefly, Stockholm Syndrome leads to a hostage developing an emotional bond with their captor, where they sympathize with them and form positive feelings towards them.
It is believed that this syndrome is a coping mechanism (Cantor C, Price J), a result of spending intimate time with their captor where they are subjected to abuse. The captives are in an incredible amount of stress and typically lose the ability to think rationally and reasonably. Their primary motive is to survive, and this instinct leads them to develop defense mechanisms. Hatred, in this situation, would not be productive, and obedience is the only way to survive.
It is believed that 3 aspects make it more likely for the syndrome to develop:

Long duration of time spent together
Spending a longer duration of time with their captors leads the
hostages to believe that their captors truly will not kill them. They
believe that the captors are their friends and they will get out of
this messy situation together.

Intimate and continual contact between the captor and the hostage
In order to ensure that they do not anger their captor in order to escape violence at their hands, the focus of the captives is on obedience and pleasing their captors, for which they try to get to know their captors during the period of their captivity. This 'humanizes' their captors. Moreover, the captives want to make sure that their feelings do not appear fake, and eventually begin believing that they are genuine.

Small acts of kindness
During the course of the captivity, if the captor shows an unexpected
act of kindness, or simply chooses to not behave violently, it may
lead the captive to become affectionate towards their captor. In a
situation where a person is made to fear for their life, this small
act can be seen as merciful on the captor's part.


Women are said to be more likely to develop Stockholm Syndrome. (Graham, Dee L. R.) Societal conditions lead the women to be afraid of male violence. This fear encourages them to engage in actions that would please the male, and bond with them to survive. Similarly, the captives bond with their captors and attempt to please them to survive.
A lesser known condition is the Lima Syndrome, where the abductors develop sympathy towards their captives.
As mentioned in the beginning, these conditions are still widely contested and much more research is required.