arduino rfid with led, code is compiling but not working as expected!
Your unespecified problems are consecuence of a collection of small details.


You are not putting a binary zero to end the input string.
That's not the way to read serial input.
Code doesn't filter out control caracteres (LF, CR).


Here is your code cleaned up:

#define ID_SIZE 12

int count=0;
char input[ID_SIZE + 1]; // rfid input
int led=3; // led pin
char first[ID_SIZE + 1]= {"270059204B15"}; //rfid tag no

void setup()
{
    // put your setup code here, to run once:
    Serial.begin(9600);
    pinMode(led,OUTPUT);
}

void loop()
{

    // put your main code here, to run repeatedly:
    while(Serial.available() &gt; 0 &amp;&amp; count &lt; 12) {  // code for rfid input
       char c = Serial.read();
       if (isAlphaNumeric(c)) {
          input[count++]=c;
          }
      }

    input[count] = 0;
    if(count &gt;= 12) {
        Serial.print(input);
    }

    if(strcmp(input,first)==0) /*comparing two string rfid tag no and input
   if matches led is on*/
    {
        digitalWrite(led,LOW); /* as the board which we are using is in sink
    mode low is taken as 1 or on*/
        delay(500);
        Serial.println("led is on\n");
        input[0] = count = 0;
    }

    else {
        digitalWrite(led,HIGH);
        delay(500);
        Serial.println("led is off\n");
    }
}


And here is the result:



Edit:

The C strings are char arrays of undefined lenght. To signal the end of the string, put a binary zero next to the (effective) last element. Then, if you want to store a 10 chars string, you need an 11 elements arrays (10 for the string itself, 1 for the binary zero). 

Failure to put a binary zero at the end of a string is a very common cause of program failure.

Control characters. In general, when you type "TEST" in the Serial Monitor and press SEND, what Arduino receive is the word TEST itself, plus a Line Feed/Carriage Return pair (LF/CR) to mark the end of the line.

In real world, your serial input can be contaminated with tabs, spaces, LF/CR and other valid chars. You need to discard them (unless they are valid for your app).