connecting firebase and nodemcu

how to pass a string variable from firebase to arduino

You can't. You can pass a value, not a variable. The value might be stored in a variable, after it is obtained.