Is "settings" needed in hook_field_widget_info()? hook_field_formatter_info() and hook_field_widget_info return an array containing a "settings" index. I want to know when is it used. What happens if it is empty, or just omitted?

My formatter and widget for my custom field does have settings. It's just that during widget/formatter definition the settings are not known yet.
If the hooks your module implements don't set that array index, the function invoking them will set them to an empty array. See _field_info_collate_types().

  foreach (module_implements('field_widget_info') as $module) {
    $widget_types = (array) module_invoke($module, 'field_widget_info');
    foreach ($widget_types as $name =&gt; $widget_info) {
      // Provide defaults.
      $widget_info += array(
        'settings' =&gt; array(),
      );
      $info['widget types'][$name] = $widget_info;
      $info['widget types'][$name]['module'] = $module;
    }
  }




  foreach (module_implements('field_formatter_info') as $module) {
    $formatter_types = (array) module_invoke($module, 'field_formatter_info');
    foreach ($formatter_types as $name =&gt; $formatter_info) {
      // Provide defaults.
      $formatter_info += array(
        'settings' =&gt; array(),
      );
      $info['formatter types'][$name] = $formatter_info;
      $info['formatter types'][$name]['module'] = $module;
    }
  }


It is then up to the module implementing those hooks, and any related one, to correctly handle the values for that array index, even in the case another module changes it to a value the module is not expecting.