Remember, Bran witnesses the creation of the Night King, and he experiences the touch of the ancient ice zombie while warging in season six. These two events suggest a strong connection already exists between these two characters. According to Turm0il26, the reason the Night King and Bran seem to be drawn to each other is because they are essentially the same person at different points of the same timeline. The Reddit theory reads:
"Bran goes back all the way to where the Night king was created, to warg into the human that later is going to become the Night king. He wargs into him to instead stop the 'dragonglass into the heart'-event from happening. Only he doesn't think of that the children of the forest won't recognize him from the future, and that they at that point are in war with the first men (he is gagged because of all the weird future-talk). When he realized he failed again, he tries to go back in the current timeline, but can't because he's too deep into the past and stayed too long ('it is beautiful beneath the sea, stay too long and you drown'). From here Bran gets stuck in the past (exactly as Brynden and Jojen warned him not to) and becomes the Night King."