String literals are cached in a string pool and this saves a lot of heap space because different string variables refer to the same object in a string pool . This is possible only when Strings are immutable.
Also sensitive information like passwords etc. are stored as String variables and if they are mutable it poses huge security threat.
These are the major reasons to keep String class immutable.