Any idea why my LED fails to operate with the if statement
The LED fails to operate with the if statement because calling the return statement Terminates a function and returns a value from a function to the calling function, if desired. Try your sketch with the return statement as the "last thing" in the function.

#include &lt;LiquidCrystal.h&gt;

float tempC;
int tempPin = 0; // BS E D4 D5 D6 D7
int buzzer = 4;
int LED = 2;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
unsigned char i;

void setup() { 
  lcd.begin(16, 2); 
  lcd.setCursor(0, 0); 
  lcd.print("Temp C "); 
  pinMode(LED, OUTPUT); 
  pinMode(buzzer,OUTPUT);//initialize the buzzer pin as an output
} 

void loop() { 
  tempC = getTemperature(); 
  lcd.setCursor(6, 0); // Display Temperature in C 
  lcd.print(tempC); 
  delay(500); 
} 

float getTemperature() { 
  int tempReading = analogRead(tempPin); // This is OK 
  double tempK = log(1000000.0 * ((1024.0 / tempReading - 1))); //Temperature in Kelvin 
  tempK = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * tempK * tempK )) * tempK ); 
  if (tempC&gt;0) digitalWrite(LED,HIGH); else digitalWrite(LED, LOW); 
  return (tempK - 273.15);
}