The mental illness that defines pre-surgery Charlie allows him to function in society, but it prevents him from forming meaningful relationships with others. Many people mock him for his illness, while others are sympathetic but see no reason to form a friendship. After the surgery, Charlie becomes aware of the stigma of his mental illness, making him angry and bitter about his treatment.
"The more intelligent you become the more problems you'll have, Charlie. Your intellectual growth is going to outstrip your emotional growth."
(Keyes, Flowers for Algernon, Google Books)
However, Charlie's increased intellect also allows him to become aware of the things he was missing; real love and friendship, and rational understanding of the world. Had the surgery been permanent, Charlie would have slowly acclimated himself to life and people, and become a normal member of society. When his mind begins to revert, the one thing that he mourns the most is the loss of reading and writing; since Charlie records his thoughts, the inability to perform these tasks hurts him more than losing his friends. However, even when his mental state has regressed further than before the surgery, Charlie's mind itself has been expanded; he is aware more than ever of his place in the world, and so is better equipped to handle situations and people who would take advantage of him. Overall, despite the loss of his intellect, Charlie is better off after the surgery, even if only a little.
Obviously, Charlie's brain functions much better after the surgery. His reading skills are greatly improved and he has other academic abilities that he did not have before. However, with this knowledge comes a greater awareness of the world around him. For example, Charlie realizes that the people he worked with, whom he thought were his friends, were really making fun of him.After the surgery, Charlie is able to see the cruelty that is so rampant in the world. One could argue that Charlie was better off before his surgery, when he had his idealized view of society; hence the phrase "ignorance is bliss."