Since William Faulkner (or his omniscient narrator) never reveals exactly why Emily killed Homer, we'll never know for sure what motivated her to do so. It's certainly possible to consider whether Homer may have bragged about having sex with Emily, and that is a possibility for her decision to kill him. However, times being what (and when) they were, Emily may have abstained from having sex with Homer until they were married; thus, she may have still remained a virgin. Although Emily upset the town by riding around unescorted with Homer on Sundays, there is really no other evidence that he spent the night with her, other than the narrator's suggestion that "she was fallen... a fallen monument."
I believe that Emily had convinced herself that Homer would eventually ask her to marry him, even though Homer "was not a marrying man." Although we are not absolutely certain if she bought the toilet set and men's clothing before she bought the rat poison, it would make more sense that she had come to believe that Homer was going to propose. She purchased the items before Homer made it clear that they would not be married and then bought the rat poison. Emily's main reasons for killing him were because she was angry that he had turned her down, and that she knew that this was her last, best chance at matrimony. There were no other men in the town in whom she was interested (and vice versa), and no other prospects were likely. Emily had already exhibited her fondness for keeping those she loved close to her, even in death, when she refused to allow her father's body to be interred. Since the townspeople assumed that Homer had merely left town for good, his work being completed, Emily must have realized that he would never be missed. Her resulting actions--poisoning Homer and placing his remains in her upstairs bedroom--was a last-ditch effort to cling to the man she loved: a twisted act of romance conceived in her diseased mind.