It’s pretty easy to check if a Jetpack module is active:
$jetpack_active_modules = get_option('jetpack_active_modules');
if ( class_exists( 'Jetpack', false ) && $jetpack_active_modules && in_array( 'your-module', $jetpack_active_modules ) ) {
// Do something
}

