The postmaster is bored out of his mind in this provincial Indian town. There's no culture to speak of, and no one of sufficient erudition to talk to. With vast amounts of spare time on this hands and nothing to do, he tries to occupy himself by writing poetry. But as the surrounding landscape offers little in the way of poetic inspiration, the postmaster needs to find something else to do to while away the hours.
So he hits upon the idea of teaching Ratan, the little orphan girl, how to read. Ratan has been very busy running errands for the postmaster, and a relatively close bond has developed between the two. Not that there's anything especially warm in their relationship; the postmaster's phlegmatic personality prevents him from forming any kind of fatherly attachment toward Ratan. He acts toward Ratan more like a stern but fair teacher, and the little girl responds accordingly.
What this tells us about the postmaster is that he's the kind of person who needs to be in charge. He's already higher up the social ladder than Ratan, and teaching her how to read reinforces his control over an alleged social subordinate. Though Ratan develops a certain affection for her teacher, the postmaster is keen to maintain the appropriate distance between himself and someone he regards as a social inferior.
As the postmaster won't be around long enough to carry out Ratan's education to its conclusion, one can reasonably surmise that his motivations in teaching the little girl are largely selfish. He sees teaching her as a way of staving off boredom as well as providing an opportunity to make himself feel important in a town he doesn't like, where he doesn't know anyone, and where no one really knows him.