Yes, Orwell's biography has everything to do with the reasons for writing Animal Farm. He says in one memoir that he wanted to write a piece of political fiction that would be entertaining, which is why he chose the animal fable as the vehicle for his satire. Orwell had worked for the British government in Burma where he observed and participated in its imperialist regime. While British imperialism was not the totalitarianism depicted in the novel, he did learn from his experience much about the relationships and the psychology of power, which in his mind, naturally corrupts the individual, even if he is well meaning--which the pigs in Animal Farm are not. The seduction of power is one topic Orwell studies in Animal Farm.
Tthakar's answer is excellent. From what I understand of Orwell, he was deeply disillusioned by what he saw as the corruption of the socialist ideal. He saw people rising to power who essentially carried on--even trumped--the abuse of power that happened under the monarchy. Animal Farm began, like 1984, out of resistance, but it became much more, which is why we still teach it today. As well as an allegory about the situation in Russia, it offers amazing insight into power relations. Look at what happens: the pigs rewrite the laws to suit themselves; the sheep blurt out whatever inane saying they are taught to say without ever once thinking about what they are saying and whether or not it is what they believe; the workers respond to stress by working harder, which, like Boxer, they do until they have worn themselves out completely, and so on. The animals correspond so perfectly to types of people in our society that the book has come to be not only a warning, but also a wry sardonic comment on the state of the willfully ignorant masses: we will forever be abused by corrupt authority unless we think and act with authority ourselves.