Communicate at three important points in time:
Before the dive - about experience, training, goals of this dive, hand signals, gear, buddy check, how often you'd like to check air, turn point, lost buddy procedure, anything and everything. At a minimum the "before the dive" communication should catch a bad buddy pairing before you even get in the water.
During the dive - everything from "OK" to "Check out that eel." Now of course I'm not saying to pester your buddy the whole time, but communicating with each other ensures you're close enough to do so, understand each other, and keeps you aware of what each other are up to
After the dive - debrief the dive, ask what they meant with this hand signal, or why they did that when you saw a certain thing, ask them about your trim, find out if you were too close or not close enough, ask if there was anything you could have done to be a better buddy
The amount and focus of the communication at each of the three time points will vary by situation - vacation insta-buddy different than your every-weekend local buddy - but the three "Before-During-After" time periods should be addressed on every dive.
My main buddy and I have become much better buddies with each other, and with other divers, as we always work on making sure that we communicate with each other and have an understanding of the what the other diver's wants and needs are.
Lastly, everyone here seems to focus on "at what point do you decide that this guy/gal isn't a good buddy for me." I would recommend that each of us also evaluates ourselves in that respect, and if we decide WE are not a good buddy for them, we need to determine what we can do to address that. That might be a function of skill level, comfort in the water, or similar. Further, could be a function of diving style (eg pure rec vs DIR) or goals (eg photo vs hunting). At that point WE must decide if we want to address the differences ourselves to become a better buddy to that person or simply buddy with someone else. At that point, even that comes down to communication: tell the person either "I know you really want a lot of room and space for your photography and I'm more of a 'right at each others shoulder' kind of guy..." if you want to bail on him or you might say "I'm sort of a DIR-leaning kind of guy, and believe in doing an S-drill at the start of every dive. If you want I can show you how that goes on the next one..." Then you either decide to dive together or not, but everyone knows where they stand either way.