How to enqueue javascript for WP Customize options sidebar?

Use the action customize_controls_enqueue_scripts:

add_action( 
    'customize_controls_enqueue_scripts', 
    'enqueue_customizer_scripts' 
);

function enqueue_customizer_scripts()
{
    wp_enqueue_script(); // fill in the details here
}

To add inline scripts in the header, use the action customize_controls_print_scripts.

See wp-admin/customize.php for details.