Since you didn't post the entire sketch I can't tell, but what have you done to ensure that the value of angLR doesn't ever get less than -90 or greater than 90. If it does exceed those values, then your if's will never be true.
if you don't already do something like this consider this modification to your code
int ldr1 = A0; // right ldr
int ldr2 = A1; // centre ldr
int ldr3 = A2; // left ldr
float stepsize = 1.8;
float angLR = 0.0;
}
void loop()
{
int right = analogRead(ldr1);
int centre = analogRead(ldr2);
int left = analogRead(ldr3);
if((right > centre) && (angLR >= -90.00 && angLR <= 90.00))
{
stepperh->onestep(BACKWARD,DOUBLE);
angLR += stepsize;
Serial.print("Angle LR °");
Serial.println(angLR);
}
if((left > centre) && (angLR >= -90.00 && angLR <= 90.00))
{
stepperh->onestep(FORWARD,DOUBLE);
angLR -= stepsize;
Serial.print("Angle LR °");
Serial.println(angLR);
}
// The following two lines of code ensure that angLR is never outside an
// acceptable range.
if (angLR < -90) angLR = -90;
if (angLR > 90) angLR = 90;
}