When is it ok to king-make?
In general, king making is contentious.

In my mind, it's best reserved for when it will allow ending a game "Now-ish" in order to either facilitate a different, more generally enjoyable game, or to allow players to leave.

There are a few other conditions where I find it less than unacceptable. These basically boil down to "not letting A have a runaway victory by aiding B."  

In some cases, it's a matter of allying with B (publicly or not) so that A has some competition because A is in a clear runaway. I've seen this a lot in a variety of public scoring track games.

In others, it's quietly avoiding helping A because of A being in the lead, which results in B having a chance. This is most frequent in my plays of Settlers of Catan - no one trades with the leader... In this case, it generally lengthens the game needlessly, as the leader often is able to stay the leader.

The other condition is when the game allows for alliance victories, or as with Dune, one or more players has a kingmaking victory condition. In Dune, the Bene Gesserit win by correctly predicting the turn of victory and the victor - the BG player works very hard to king-make.