Efficient way to calculate the sum of all primes between a range
Nice implementation, it's already efficient but as noted in the comments can be improved. Few general suggestions:

Format the code: many IDE support auto formatting or you can use an online formatter.

Omitting brackets is not good practice: it's better to include the brackets to avoid confusion when reading or changing the code. See the difference from:
static boolean isPrime(int n){ 
      if(n==1)return false; 
      for (int i=2; i*i&lt;=n; i++) 
          if (n%i==0) return false;
      return true; 
} 

To:
static boolean isPrime(int n) {
    if (n == 1) {
        return false;
    }
    for (int i = 2; i * i &lt;= n; i++) {
        if (n % i == 0) {
            return false;
        }
    }
    return true;
}


Arrange the methods from general to specific, it's easier to follow. From:
static boolean isPrime(int n){ 
}

static int sum(int a, int b){ 
    //call isPrime
} 

public static void main(String[] args)throws IOException{ 
    // call readint
    // call sum
} 

static String next () throws IOException {
}

static int readInt () throws IOException {
    // call next
}

To:
public static void main(String[] args)throws IOException{ 
    // call readint
    // call sum
}

static int readInt () throws IOException {
    // call next
} 

static String next () throws IOException {
}

static int sum(int a, int b){ 
    //call isPrime
} 

static boolean isPrime(int n){ 
}


The methods readInt and next can be replaced with java.util.Scanner:
Scanner scanner = new Scanner(System.in);
int q = scanner.nextInt();


Close the resources: br.close() (or scanner.close()) at the end of main or if exceptions occur.

PrintWriter pr is not used.

The method sum(int a, int b) does not sum two integers. A better name might be sumPrimesBetween

StringTokenizer is discouraged for new code, from the docs:

StringTokenizer is a legacy class that is retained for compatibility
reasons although its use is discouraged in new code. It is recommended
that anyone seeking this functionality use the split method of String
or the java.util.regex package instead.



Performance
As mentioned in the comments, since you know the upper bound 10^5 you can precompute all the prime numbers in advance. The main logic can be:

Precompute all prime numbers until 10^5: you can use an array of boolean initialized to true and then set the corresponding index to false if not prime. For example:

static void computePrimesUntil(int n) {
    isPrime = new boolean[n+1];
    Arrays.fill(isPrime, true);
    isPrime[0] = isPrime[1] = false;
    for (int i = 2; i &lt;= n; i++) {
        if (isPrime[i] &amp;&amp; (long) i * i &lt;= n) {
            for (int j = i * i; j &lt;= n; j += i){
                isPrime[j] = false;
            }
        }
    }
}

Code inspired from here.

Parse all the questions from the user
Output the sum of primes for each question

Note: depending on how the total running time is calculated, you need to consider the time to parse the input and print the results. The total running time also depends on the machine where you run the program.