It's the combination of shape, speed and size that makes dimples advantageous in golf balls but not much else.
It all comes down to the flow condition at the point where flow separation occurs. In calm air, every boundary layer starts as a laminar boundary layer. Since the energy transfer across the stratified flow in the laminar boundary layer is reduced to shear, the molecules close to the wall will lose speed quickly, so that even at a modest pressure rise downstream separation occurs quickly.
Inside the laminar boundary layer, small disturbances become less and less damped the higher the local Reynolds number becomes, and at a Reynolds number of around 400,000 in unaccelerated flow some frequencies become unstable (see Tollmien-Schlichting waves) and will eventually create so much cross movement that the boundary layer becomes turbulent. Now parcels of air which flow at high speed in the outer part of the boundary layer will move close to the wall and kick the slow parcels there ahead, greatly reducing the deceleration of the flow close to the wall, at the price of slowing down and expanding the whole boundary layer.
Such a turbulent boundary layer is much better in following a contour with an adverse pressure gradient since it shows less deceleration of the flow at the wall. A pressure rise is generally caused by a contracting body shape. Separation is delayed and the separation, once it occurs, is much smaller. The pressure in separated flow is lower than ambient, so rearward-facing areas with separated flow cause massive drag. Therefore, separation needs to be suppressed as long as possible to minimize drag.
If the contour of a body contracts at a local Reynolds number below that where natural transition to a turbulent boundary layer occurs, the still laminar boundary layer will cause early separation. The dimples of a golf ball help to trip the boundary layer early into its turbulent version, thus delaying separation and reducing drag.
If the local Reynolds number (which is proportional to the product of speed and body length) is higher, such that the boundary layer turns turbulent before the part of the body with the adverse pressure gradient is reached, dimpling the surface will still cause earlier transition, but will not change the separation location. Faster and/or larger objects than golf balls simply do not need dimples.
Also, if the direction of movement of the object is always the same (think model airplane or glider wing), you do not need dimples all over its surface but only shortly before the pressure rise starts. Those are mostly shaped differently for better effectivity and aptly named "turbulators". Since the direction of movement of a golf ball is free, dimples need to cover its whole surface to be at the correct location where they can make a difference in drag.