Interrupts are firing when nothing is connected

I have two interrupts using push buttons on pins 2 and 3. They are used to initiate powering On or Off of the project. The issue is both are unresponsive to when I press the buttons but come on randomly when nothing is plugged into the respective pins.

Here is the code:

// these constants won't change:
const int pumpPin = 7;      // pump switch connected to digital pin 7
const int coilPin = 8;      // pump switch connected to digital pin 8
const int waterSensor = A0; // the piezo is connected to analog pin 0
const int threshold = 950;  // threshold value to decide when the detected sound is a water or not


// these variables will change:
int sensorReading = 0;      // variable to store the value read from the water sensor pin
int pumpState = LOW;        // variable used to store the last pump pin status. Helpful for debouncing.
int coilState = LOW;        // variable used to store the last coil pin status. Helpful for debouncing.
int pwmPin = 9;             // Analog pin used to send PWM signal to coil


void setup(void) {
  //enable interrupt 0,1 which uses pin 2,3
  //jump to the increment function on falling edge
  attachInterrupt(0, powerRequest, FALLING);
  attachInterrupt(1, powerDown, FALLING);
  Serial.begin(9600);                       //turn on serial communication
}

void loop() {
  // read the sensor and store it in the variable sensorReading:
  sensorReading = analogRead(waterSensor);
  float voltage = sensorReading * (5.0 / 1023.0);
  Serial.println(sensorReading);
  Serial.println(voltage);

if (sensorReading < threshold) { 
    if((pumpState == HIGH) && (coilState == HIGH)) {
      // toggle the status of the pumpPin and coilPin:
      pumpState = LOW;
      coilState = LOW;
      Serial.println("Water level is low!");     // send the string "Water level is low!"
      digitalWrite(pumpPin, pumpState);       // Turn the pump off
      Serial.println("Pump is off!");         // send the string "Pump is off!"
      digitalWrite(coilPin, coilState);       // Turn the coil off
      Serial.println("Coil is off!");         // send the string "Coil is off!"
      analogWrite(pwmPin, 0);                 // set the PWM off
      Serial.println("PWM is off!");          // send the string "PWM is off!"
    }
    else {
      Serial.println("Water level is low!");    // send the string "Water level is low!"
      Serial.println("Not ready for power!");    // send the string "Not ready for power!"
    }
}
else if (sensorReading >= threshold) {
    if((pumpState == HIGH) && (coilState == HIGH)){
      Serial.println("Water level is good!");    // send the string "Water level is good!"
      digitalWrite(pumpPin, pumpState);       // Turn the pump on
      Serial.println("Pump is on!");          // send the string "Pump is on!"
      digitalWrite(coilPin, coilState);       // Turn the coil on
      Serial.println("Coil is on!");          // send the string "Coil is on!"
      analogWrite(pwmPin, 102);               // set the PWM on
      Serial.println("PWM is on!");           // send the string "PWM is on!"
    }
    else { 
      Serial.println("Water level is good!");    // send the string "Water level is good!"
      Serial.println("Power when ready!");    // send the string "Power when ready!"
      pumpState = LOW;
      coilState = LOW;
    }
}
else {
  Serial.println("Water level is low! Catch Error");    // send the string "Water level is low!"
  Serial.println("Not ready for power! Catch Error");    // send the string "Not ready for power!"
}

delay(2000);
}


// Interrupt service routine for interrupt 0
  void powerRequest() {
    // Update pins if water tank empty
    if (sensorReading < threshold){          // Water level is low    
      pumpState = LOW;
      coilState = LOW;
    }
    else if(sensorReading >= threshold){
      pumpState = HIGH;
      coilState = HIGH;  
    }
    // Else update pins if water level is good
    else {                                    // Water level is good
      pumpState = LOW;
      coilState = LOW;
    }
  }
// Interrupt service routine for interrupt 1
  void powerDown() {
  pumpState = LOW;
  coilState = LOW;
  }
int pumpState = LOW;        // variable used to store the last pump pin status. Helpful for debouncing.
int coilState = LOW;        // variable used to store the last coil pin status. Helpful for debouncing.

These MUST be volatile, since they are used by the ISRs AND by loop().

The internal pullup resistors for pins 2 and 3 are not enabled, so you have external resistors connected to the pins and ground or 5V, to prevent floating pins, right?

I did not connect any external resistors to pins 2 or 3. I just had two buttons to ground. So you are saying I should change the code to be:

// these constants won't change:
const int powerRequestPin = 2;    // pump switch connected to digital pin 2
const int powerDownPin = 3;       // pump switch connected to digital pin 3
const int pumpPin = 7;            // pump switch connected to digital pin 7
const int coilPin = 8;            // pump switch connected to digital pin 8
const int waterSensor = A0;       // the water sensor is connected to analog pin 0
const int threshold = 950;        // threshold value to decide when water is detected or not


// these variables will change:
int sensorReading = 0;            // variable to store the value read from the water sensor pin

//***********************added**********************************
volatile int pumpState = LOW;     // variable used to store the last pump pin status.
volatile int coilState = LOW;     // variable used to store the last coil pin status.
//**************************************************************

int pwmPin = 9;                   // Analog pin used to send PWM signal to coil


void setup(void) {
  
  //***********************added********************************
  pinMode(powerRequestPin,INPUT);
  pinMode(powerDownPin,INPUT);
  digitalWrite(powerRequestPin, HIGH);
  digitalWrite(powerDownPin, HIGH);
  //************************************************************
  
  //enable interrupt 0,1 which uses pin 2,3
  //jump to the increment function on falling edge
  attachInterrupt(0, powerRequest, FALLING);
  attachInterrupt(1, powerDown, FALLING);
  Serial.begin(9600);                         //turn on serial communication
}

void loop() {
  // read the sensor and store it in the variable sensorReading:
  sensorReading = analogRead(waterSensor);
  float voltage = sensorReading * (5.0 / 1023.0);
  Serial.println(sensorReading);
  Serial.println(voltage);

if (sensorReading < threshold) { 
    if((pumpState == HIGH) && (coilState == HIGH)) {
      // toggle the status of the pumpPin and coilPin:
      pumpState = LOW;
      coilState = LOW;
      Serial.println("Water level is low!");  // send the string "Water level is low!"
      digitalWrite(pumpPin, pumpState);       // Turn the pump off
      Serial.println("Pump is off!");         // send the string "Pump is off!"
      digitalWrite(coilPin, coilState);       // Turn the coil off
      Serial.println("Coil is off!");         // send the string "Coil is off!"
      analogWrite(pwmPin, 0);                 // set the PWM off
      Serial.println("PWM is off!");          // send the string "PWM is off!"
    }
    else {
      Serial.println("Water level is low!");    // send the string "Water level is low!"
      Serial.println("Not ready for power!");    // send the string "Not ready for power!"
    }
}
else if (sensorReading >= threshold) {
    if((pumpState == HIGH) && (coilState == HIGH)){
      Serial.println("Water level is good!");    // send the string "Water level is good!"
      digitalWrite(pumpPin, pumpState);       // Turn the pump on
      Serial.println("Pump is on!");          // send the string "Pump is on!"
      digitalWrite(coilPin, coilState);       // Turn the coil on
      Serial.println("Coil is on!");          // send the string "Coil is on!"
      analogWrite(pwmPin, 102);               // set the PWM on
      Serial.println("PWM is on!");           // send the string "PWM is on!"
    }
    else { 
      Serial.println("Water level is good!");    // send the string "Water level is good!"
      Serial.println("Power when ready!");    // send the string "Power when ready!"
      pumpState = LOW;
      coilState = LOW;
    }
}
else {
  Serial.println("Water level is low! Catch Error");    // send the string "Water level is low!"
  Serial.println("Not ready for power! Catch Error");    // send the string "Not ready for power!"
}

delay(2000);
}


// Interrupt service routine for interrupt 0
  void powerRequest() {
    // Update pins if water tank empty
    if (sensorReading < threshold){          // Water level is low    
      pumpState = LOW;
      coilState = LOW;
    }
    else if(sensorReading >= threshold){
      pumpState = HIGH;
      coilState = HIGH;  
    }
    // Else update pins if water level is good
    else {                                    // Water level is good
      pumpState = LOW;
      coilState = LOW;
    }
  }
// Interrupt service routine for interrupt 1
  void powerDown() {
  pumpState = LOW;
  coilState = LOW;
  }

I put // ******** to block off the changed code. Is this what you were suggesting?

Yes, and you need something connecting the pins to a known voltage. If the pin is unconnected, or worse yet connected only to a button that isn't closed, then the pin is floating and will fire your interrupt anytime it picks up a little stray signal.

http://www.gammon.com.au/switches