http://javarevisited.blogspot.de/2010/10/why-string-is-immutable-in-java.html
Sometimes I can't open this page without proper proxy, so I have to copy the content here.
1)String is Immutable in Java because String objects are cached in String pool. Since cached String literal is shared between multiple client there is always a risk, where one client's action would affect all other client. Since caching of String objects was important from performance reason this risk was avoided by making String class Immutable.
2)String has been widely used as parameter for many Java classes e.g. for opening network connection, you can pass hostname and port number as string , you can pass database URL as string for opening database connection, you can open any file in Java by passing name of file as argument to File I/O classes.
In case, if String is not immutable, this would lead serious security threat , I mean some one can access to any file for which he has authorization, and then can change the file name either deliberately or accidentally and gain access of those file.
3)Since String is immutable it can safely shared between many threads ,which is very important for multithreaded programming and to avoid any synchronization issues in Java. Immutability also makes String instance thread-safe in Java, means you don't need to synchronize String operation externally.
4) Another reason of Why String is immutable in Java is to allow String to cache its hashcode. being immutable String in Java caches its hashcode, and do not calculate every time we call hashcode method of String, which makes it very fast as hashmap key to be used in hashmap in Java.
5)The absolutely most important reason that String is immutable is that it is used by the class loading mechanism, and thus have profound and fundamental security aspects.
Security and String pool is primary reason of making String immutable.