How do I get current page ID in WordPress customizer file?

Thanks for your question.

active_callback is exactly what you’re looking for. You can use it with controls:

$wp_customizer->add_control(
    'setting_name',
    array(
        'type' => 'text',
        'section' => 'section_name',
        'label' => 'Option with context',
        'active_callback' => 'is_front_page'
    )
);

and with sections:

$wp_customize->add_section(
    'section-name',
    array(                                             
        'title' => 'Section with context',
        'active_callback' => 'is_front_page'
     )
);

In examples above, this new setting/section will be visible only for front page, thanks to native is_front_page function. You can also use other Conditional Tags.

But of course you can make your own contexts:

function mytheme_is_contact_page() {
    return is_page_template( 'template-contact.php' );
}

function mytheme_is_page_id_123() {
    return is_page( 123 );
}