The first sentence means that Sujatha was the only person to pass in English; all the other students in her class failed the exam. It doesn’t say anything about how well or how badly Sujatha did in her other subjects.
The second sentence suggests that the only subject Sujatha managed to clear is English. She failed in all other subjects. In this case, we are not comparing Sujatha with her classmates. We do not know how well her classmates performed in the English exam.
Source: “The Hindu” – Know Your English Column Dec. 25, 2007