16x2 LCD showing garbage values after switching relay

I am making a project named "smart garden irrigation system" in which i am using a soil moisture sensor if the soil is dry it will switch a water pump (working at 220V ac ) via a 5v relay and displays all the condition of soil and the status of pump on 16x2 LCD but sometimes after working fine lcd start showing garbage values and sometimes relay get triggered before the set elay time.How can i fix this problem ?.
I am attaching the copy of code

[code]
#include<LiquidCrystal.h>

LiquidCrystal lcd(7,8,9,10,11,12);

const int relayPin = 5;
const int sensorPin = 0;

void setup() {
  // put your setup code here, to run once:
lcd.begin(16,2);
pinMode(relayPin,OUTPUT);

lcd.print("Smart Garden Ir-");
lcd.setCursor(0,1);
lcd.print("rigation System");

delay(1000);

}

void loop() {
  // put your main code here, to run repeatedly:

int sensorReading = sensorValue();



if(sensorReading < 700 && sensorReading > 100)
{
lcd.clear();
delay(100);
digitalWrite(relayPin,HIGH);
lcd.print("Condition: Dry ");
lcd.setCursor(0,1);
lcd.print("Watering Plants.");
delay(5000);
lcd.clear();
delay(100);
digitalWrite(relayPin,LOW);
lcd.print("Smart Garden Ir-");
lcd.setCursor(0,1);
lcd.print("rigation System");
delay(5000);
sensorReading = sensorValue();
}


else if(sensorReading>=700)
{
lcd.clear();
lcd.print("Condition: Wet");
delay(5000); 
lcd.clear();
lcd.print("Smart Garden Ir-");
lcd.setCursor(0,1);
lcd.print("rigation System");
delay(5000);
sensorReading = sensorValue();
}

else if(sensorReading < 100)
{
lcd.print("Smart Garden Ir-");
lcd.setCursor(0,1);
lcd.print("rigation System");
delay(5000);
sensorReading = sensorValue();
}

}


int sensorValue()
{
int sensorReading = analogRead(sensorPin);
return sensorReading;  
}