Well, I believe your literacy is the proportion between science and population; if you produce 100 science with 50 population your literacy is worth 100%. BUT however, what's not counted in your literacy are science produced by tiles, universities... JUST population and science.
How to get 100% then? Well, the word literacy says it already: how many of your people can read AND read. This means to have 100% literacy you have to build a library, and later, when you researched the appropriate technology, a public school in every city: then you produce 2 science for 2 citizens. Then everyone in your empire can read.
So if you want 100% literacy, don't go into a war (not as I do), because conquered cities bring your literacy down (but your points up xp)!
At least that's how I would explain it...