Custom form, custom template or preprocess function

Having custom template or function to preprocess your custom form in module has few tricks.

First you need to define it in form

$form = array();
$form['#theme'] = 'my_form_theming_function';
....

then define hook_theme

function my_module_theme() {
  return array(
    'my_form_theming_function' => array(
      'render element' => 'form',
    ),
  );
}

and then finally define that theme function in module as

function  theme_my_form_theming_function($variables) {
  dpm($variables);
  // Renders all elements of a form.
  return drupal_render_children($variables['form']);
}

and only with this combo you will get able to change date in your form before rendering. Crucial part is this
my_form_theming_function to be on all places the same.

To have file template and edit output there call this

function my_module_theme() {
  return array(
    'my_form_theming_function' => array(
      'render element' => 'form',
      'path' => drupal_get_path('theme', 'mytheme') . '/templates',
     'template' => 'my-site-form',
    ),
  );
}

If you want to have form output as Table, try this tutorial.

http://e9p.net/theming-drupal-7-form-elements-table