Why is Emily so attached to Homer?
Like the first answer, I think Emily has her biological clock ticking. As a result, I think she over-looks the fact that Homer Barron is a "Northerner" a "Day Laborer" and even admitted himself that "he liked men."
But there is more than that. For her entire life Miss Emily has been expected to act a with a certain sense of pride, dignity, and culture. Homer is different. He is something that would have been off limits for her to socialiaze with had anyone in her immediate family still been alive. And clearly, he likes her. He likes spending time with her. He indulges her with attention, he comes without any pre-conceived ideas (that the rest of the town suffer from), he is clearly not judgemental, and he is fun.
What lonely woman wouldn't fall for someone like that?
Miss Emily Grierson is fast approaching spinsterhood, and she is well aware that her chances of ever landing a man in Jefferson are slim. When Homer Barron arrives in town, he immediately becomes Emily's best last chance of landing a husband. Homer has many positive traits; he is apparently tall and handsome with a good sense of humor and fast at making friends. But marriage material he is not. Homer appears to be a confirmed bachelor, and Emily's efforts to change this side of him fail. Her decision to keep him around long after he is dead stems from her previous handling of her father's death: She refused to have him removed from the house until forced to by authorities. Emily has had few close men in her life, but she likes to keep them around--even in death.