This is a REALLY GENERAL rule, so use it with a grain of salt:
If a fracture is comminuted, angular, or already open do ORIF.
If a fracture is NOT comminuted, NOT anguar, and still closed, do closed reduction with casting.
I would imagine if there is any involvement of the vascular or nervous system, one would do surgery.
I like to think about it in terms of how nasty it is. A severe, multiple sites fracture, with bone pooping through skin, going through the metaphasis and the diaphysis needs to have surgery. Little johny fell off a swing and his humerus is big and puffy, needs a cast.