Use the \Magento\Bundle\Model\Product\Type::getChildrenIds() method:
\Magento\Bundle\Model\Product\Type::getChildrenIds()
It is the bundle products implementation of the universal abstract \Magento\Catalog\Model\Product\Type\AbstractType::getChildrenIds() method:
\Magento\Catalog\Model\Product\Type\AbstractType::getChildrenIds()
See also:
product-children