for (int i=0; i<4; i++)
if(memcmp(data,tag1,4)==0) tag1_card = true;
You only need to do the memcmp() once.
if(memcmp(data,tag1,4)==0) tag1_card = true;
if (tag1_card) {
digitalWrite(6,HIGH);
delay(500);
digitalWrite(6,LOW);
tag1_card=false;
}
You don't need to set a flag, then immediately afterwards check the flag.