Emily killed Homer Barron for two fairly logical reasons, at least logical from her perspective.
Because Emily's father had selfishly sent away all of her prospective suitors when she was a young woman ready for marriage, ostensibly because they were not good enough for her, he essentially doomed her to a long and unhappy life as an unmarried woman, completely at odds with her natural aspirations--to have a husband, a home, children. When Homer Barron appeared in town, an outsider and worse, a Yankee, he naturally tried to ally himself with one of the town's leading citizens. Even in Miss Emily's reduced circumstances, she was still considered at least a vestige of the the town's "aristocracy."
The town, outraged that Miss Emily would lower herself to be courted by a Yankee and a man who works with his hands, attempted to break up the relationship. The town failed, of course, but the message would not have been lost on Miss Emily.
The other problem with Homer is that he may have been homosexual or at least preferred the company of men. Faulkner tells us at one point that "Homer himself had remarked--he liked men, and it was known that he drank with the younger men in the Elks' Club--that he was not a marrying man." Despite Emily's feelings for him, he might have not been a suitable husband under any circumstances. When Emily buys arsenic, the town, and we, have no idea what she is planning to do, but given the fact that the town objected to her relationship with Homer and that Homer himself may not have wanted to be married, Emily's only chance at the kind of life her father had denied to her was to obtain a husband by horrific means--and Homer happened to be the only candidate.
Because the town, even though they knew Miss Emily was a recluse and no longer part of the community, would never have believed with any certainty that a woman of the upper class could engage in such unnatural and morally repugnant behavior as Emily did, they would not have suspected her of murder and sleeping with a corpse--such unnatural acts were not committed by people of her station. Despite observing her odd behavior for years, the town would never believe her capable of such perversion.
The townspeople do, indeed, suspect something afoul after Emily's father died and after "her sweetheart went away." When one of Emily's neighbors complains in Part II of "A Rose for Emily," the eighty-year-old mayor, Judge Stevens tells her,
"But what will you have me do about it, madam?"
"Why, send her word to stop it," the woman said. "Isn't there a law?"
After he dismisses the neighbor and others complain, the Board of Aldermen meet. The youngest member of the group concurs with the neighbor that a missive should be sent to Miss Emily to have "her place cleaned up."
"Dammit, sir," Judge Stevens said, "will you accus a lady to her face of smelling bad?"
In the Old South, represented by the Judge and Emily Grierson, telling her that there is a foul smell about her place is simply not done. Therefore, since no one dare approach her out of respect for the old ways, four men sneak into her yard and sprinkle lime inside a cellar door that they break open. After a week or two, the smell is dispelled, but no one asks anything of Miss Emily who has watched the men depart from her yard.
That a lady would commit murder is also simply not thought. Since Homer Barron is from the North, the townspeople may assume that he has simply returned to his home, a situation that satisfies them, anyway.