Custom theme for module?
you are missing a hook_theme() function

see you defined a theme for your block by using:

$block['content'] = theme('coolmodule', array('myvar' =&gt; 'helloworld'));


but you never told it how to relate your theme with the template file, this work is done in hook_theme() function.

function coolmodule_theme() {
    $items['coolmodule'] = array(
        'template' =&gt; 'coolmodule',   // here comes your template name
        'render element' =&gt; 'content'
    );

    return $items;
}


Don't forget to clear your cache