Two solenoid valves, both independent
The essence of your problem is that the delay() function blocks
your program until the delay is over. This is only acceptable if the
program is doing one single things at a time. If you need to do multiple
things in parallel, like monitoring two moisture sensors, this approach
does not work.

Then, the first thing is to get read of delay() and instead use
millis() for managing time in a non blocking fashion. The essence of
this approach is to never wait. Instead, if it is time to do something
right now, you do it. If not, you just don't do it this time, but you
don't wait. This is nicely covered in the Blink without delay
Arduino tutorial. You should get familiar with this technique, as it is
essential for many Arduino projects.

Your problem is slightly more complex than blinking an LED though, as
the valve can be in two different states, and the action to perform
depends on that state. This is managed by a software construct called a
finite state machine. Essentially you have to remember the current
state and, depending on it, you decide what to do and what the next
state should be. Here is how you could do the timed watering with this
approach:

static enum { OFF, ON } stateValve1, stateValve2;
static uint32_t startedValve1, startedValve2;  // time when started

if (stateValve1 == OFF &amp;&amp; analogRead(moisturePin1) &lt;= 250) {
    digitalWrite(solenoidPin1, HIGH); //switch solenoid ON
    startedValve1 = millis();
    stateValve1 = ON;
} else if (stateValve1 == ON
        &amp;&amp; millis() - startedValve1 &gt;= WATERING_TIME) {
    digitalWrite(solenoidPin2, LOW); //switch solenoid OFF
    stateValve1 = OFF;
}

// and the same for valve 2.


For more in-depth coverage of the subject, I recommend you read the
Majenko's tutorial on finite state machines

At this point, the next step would be to throw in some modularization in
order to make the code less repetitive. I suggest making a class for
representing a “timed valve”. The valve has a turnOn() method that
turns it on, but does nothing if the valve is actually already on. The
class takes care of turning the valve off when the time has elapsed. But
since it cannot do that all by itself, you have to call an update()
method periodically to give it a chance to check whether it's time to go
off. Here is my implementation of that class:

const uint32_t WATERING_TIME = 100000;  // for example

class TimedValve
{
public:
    TimedValve(uint8_t pin) : valvePin(pin), state(OFF) {}
    void turnOn() {
        if (state == ON) return;  // do nothing if already ON
        digitalWrite(valvePin, HIGH);
        state = ON;
        timeStarted = millis();
    }
    void update() {
        if (state == ON &amp;&amp; millis() - timeStarted &gt;= WATERING_TIME) {
            digitalWrite(valvePin, LOW);
            state = OFF;
        }
    }
private:
    uint8_t valvePin;
    enum { OFF, ON } state;
    uint32_t timeStarted;
};


And you would use it like this:

const int solenoidPin1 = 1;
const int solenoidPin2 = 2;
const int moisturePin1 = A1;
const int moisturePin2 = A2;

void setup(){
    pinMode(solenoidPin1, OUTPUT);
    pinMode(solenoidPin2, OUTPUT);
}

void loop()
{
    static TimedValve valve1(solenoidPin1), valve2(solenoidPin2);

    // Turn the valves ON if needed.
    if (analogRead(moisturePin1) &lt;= 250)
        valve1.turnOn();
    if (analogRead(moisturePin2) &lt;= 250)
        valve2.turnOn();

    // Let them turn OFF if it's time.
    valve1.update();
    valve2.update();
}