Why $wpdb->insert and $wpdb->update not working server but it is working in localhost?

Is there a compelling reason to use $wpdb for this, and not the API functions get_user_meta() and update_user_meta()?

That said, here’s something to check: Are you sure that your database prefixes on the server are wp_? If they’re not, then your code won’t work as expected.

Try this:

global $wpdb;   

$name = $wpdb->get_results("SELECT meta_value FROM {$wpdb->prefix}usermeta WHERE meta_key = 'first_name' AND user_id = ".$user." ");

    $wpdb->update( 
    $wpdb->prefix . 'usermeta', 
    array( 
        'meta_value' => $v1 
    ), 
    array( 'user_id' => $user, 'meta_key' => 'first_name'  ), 
    array( 
        '%s'
    ), 
    array( '%d', '%s') 


);