I have created new configurable products, and attached their simple products with PHP.
Now when I edit any configurable product I see this screen:

So in absence of any Magento documentation, what do I call in PHP to perform the same function as the screen above programatically?
I have seen $configurable_product->setConfigurableProductsData() used in some examples, but don’t think it is what I need.
You are right, you are creating the association/link between configurable and child products but what’s happening is that when you are creating your configurable product you are not setting up the setConfigurableAttributesData that basically setups the superattribute information for that configurable product.
This is small snippet should get you there, let me know if you have any questions or need further help.