I've seen radio buttons sometimes positioned vertically and sometimes horizontally. Which direction if any is considered superior UX? Are there factors that determine when to use one vs the other?
Vertical is preferred.
Based on research from the Neilson Norman Group as well as the various human interface guidelines for Apple and Microsoft, radio buttons should have the circle to the left of the label, and the list should be stacked vertically.
This aids the user in scanning the choices, and also reduces ambiguity caused by alternating circles and labels when laying the choices out horizontally.
Like most things in UX, the real answer depends on your use case, and generally speaking, the fewer options you are showing, the fewer issues there would be with a horizontal layout. For example, Yes/No pairs are often placed next to each other, though with adequate spacing between the two options.