Prime numbers less than a given number N
The challenge states  


  Print out the prime numbers less than a given number N  


but you are iterating  

for (int i = 2; i &lt;= limit; i++)  


The ending condition should be i &lt; limit.  


You need to check some edge cases:    


limit == 0 here you would get an exception at sb.deleteCharAt(sb.length() - 1);
limit == 1 here you would get an exception at sb.deleteCharAt(sb.length() - 1);
limit == 2 using the ending condition mentioned above you would get an exception at  at sb.deleteCharAt(sb.length() - 1); too

If you start the loop (in main)  at 3 and increment i by 2 this will be faster and you wouldn't need if (n % 2 == 0)  
Using braces {} for single if statements and loop bodies will make your code less errorprone.  
importing the whole java.io namespace is to much. Restrict the imports to the classes you need.  
the StringBuilder.append() method returns a StringBuilder object. So instead of calling sb.append(i + ",") you should call sb.append(i).append(",")


Refactoring  

The while loop  

while ((line = buffer.readLine()) != null) {
    StringBuilder sb = new StringBuilder();
    line = line.trim();
    limit = Integer.valueOf(line);
    if (limit &gt; 2) {
         sb.append(2).append(",");
    }
    for (int i = 3; i &lt; limit; i += 2){
        if (isPrime(i)){
            sb.append(i).append(",");
        }
    }
    if (sb.length() &gt; 0) {
        sb.deleteCharAt(sb.length() - 1);
    }
    System.out.println(sb);
}


and the isPrime() method  

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


in this way isPrime() would return true for each int n &lt; 3 but this is for this case perfectly fine, because this is a private method which is only called in this specific szenario given strong borders.