Use 2 DHT22 AND PASS THE DATA TO SD?
First you need to setup the second DHT sensor and a second file. Please replace the X by the number of the pin your second sensor is connected to after #define DHTPIN2

#define DHTPIN 8
#define DHTPIN2 X
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
DHT dht2(DHTPIN2, DHTTYPE);
File data_file, data_file2;


In setup() you need to also start the second dht sensor:

dht.begin(); //This command will start to receive the values from dht22
dht2.begin(); //This command will start to receive the values from dht22


In loop() you have to open the second data file in addition to the first one:

data_file = SD.open("data.txt", FILE_WRITE);
if (data_file) {
getData();
}
// if the file didn't open, print an error:
else {
Serial.println("error opening data.txt");
}
data_file2 = SD.open("data2.txt", FILE_WRITE);
if (data_file2) {
getData2();
}
// if the file didn't open, print an error:
else {
Serial.println("error opening data2.txt");
}


Although not the most efficient/elegant solution, this requires you to duplicate your void getData() function as void getData2() to work for the second sensor/file, by replacing dht by dht2 and data_file with data_file2.
This would do the logging on the two sensors in sequence.
If you want the logging in parallel you need to add the measurement and writing of the second sensor/file into the void getData() function.