How to read and write session data?

Assuming you are using WooCommerce (but equivalent to the WC()->cart->is_empty() check can be found for all major well-designed e-commerce plugins):

add_action('woocommerce_before_checkout_form',function(){
  if (is_user_logged_in()){
    $user = wp_get_current_user();
    if ( bpprocn_has_incomplete_profile($user->id) ) { // check user's profile completed or not
      if ( ! WC()->cart->is_empty() ) {
        if (wp_redirect(bp_core_get_user_domain( $user->id ) . bp_get_profile_slug() . '/edit/group/2')) exit;
      }
    }
  }
});