How to correctly get Form API single checkbox value variable from database?
You could use constants in place of string literals, sure, but that's not related to the issue you're having. That's simply a matter of converting the statement you already have to a boolean.

Which is as easy as:

$bool_enabled = variable_get('MY_SETTING_' . $form['#node_type']-&gt;type, 'disabled') == 'enabled';
$form['MY_SETTING']['#default_value'] = $bool_enabled;


Incidentally, the string "enabled" evaluates to TRUE in PHP, so it's not possible for it "not to work with enabled", it's just that 'disabled' also evaluates to TRUE, so you won't ever see a falsey value.

Personally I think the simplest solution is store the variable as an integer, 1 or 0. Then you can just assign it straight to the form element and let PHP's implicit integer -> boolean conversion take over. That's how all core (and contrib, that I've seen) modules handle it.