How to add class to the options for type radio present under radios?
You are almost there just you should change $variables['element'][$tid]['#attributes']['class'] instead of $value['#attributes']['class'] try with:

/**
 * Implements hook_preprocess_HOOK().
 */
function template_preprocess_bef_radios(&amp;$variables) {
  // No need to this two lines 
//  $variables['children'] = Element::children($variables['element']);
//  _bef_preprocess_nested_elements($variables);
  foreach($variables['element'] as $tid =&gt; $value) {
    if (is_numeric($tid) || $tid === 'All') {
      $variables['element'][$tid]['#attributes']['class'][] = Html::cleanCssIdentifier($value['#title']);
    }
  }
}