How to arrange my code block to make it work smooth and correct
I think that overall your code looks good but I don't understand why you need to log data every 1 seconds (DELAYNI = 1000; is approx 1 sec).
Although there's nothing wrong in placing the 

if(moistureOneSensorValue &gt;= ...)
...
...


codeblock in your readstatus(), it's best to separate this out into a dosomething function. Alternatively, you can read the moisture status in the void loop() itself and then place a switch case in the doSomething() function.

You can also use the data from the RTC to check moisture and do something:

void setup(){
...
time = DS3231.time(); //Time at the beginning
}

void loop(){

timeElapsed = now() - DS3231.time();//seconds elapsed

if (timeElapsed &gt;= DELAYNI){
    moisture1 = analogRead(MOISTURE1); // Read ADC value
    moisture2 = analogRead(MOISTURE2); // Read ADC value
    updateDatabase(time, moisture1, moisture2, relay1, relay2); //update the moisture values and statuses of the relays to the database
    switchRelays(moisture1,moisture2); // switch relay1 and relay2 depending on vals
time = DS3231.time(); // Update the time

    } 

}