At the beginning of Halloween, why did Michael go upstairs and kill Judith?
The only reason given in the film is the statement made by Dr. Loomis (Donald Pleasance) about his meeting Michael.
I met him, fifteen years ago; I was told there was nothing left; no reason, no conscience, no understanding; and even the most rudimentary sense of life or death, of good or evil, right or wrong. I met this six-year-old child, with this blank, pale, emotionless face, and the blackest eyes... the devil's eyes. I spent eight years trying to reach him, and then another seven trying to keep him locked up because I realized that what was living behind that boy's eyes was purely and simply... evil.
In this interview John Carpenter makes the statement around the 14 minute mark that he prefers characters that have
...less obvious movie motivation. More of; you have to supply what's going on here. That's always been scarier, more interesting to me...I always loved characters that don't have any back story. None.
So Michael's motivation according to his creator is that it is up to you to determine why Michael does what he does.
While there isn't any information given in the original, there are more hints and explanations given in Halloween 2, 4, 5 and 6 which I will detail below, however it should be noted that the content of these films is partially contradicted by Halloween H20 (1998), which is an alternate timeline that ignores everything except Halloween 1 and 2.
The short version:
Michael Myers was cursed by The Cult of Thorn, an ancient Druidic order who believed that one person would need to be given the Curse of Thorn which compelled them to murder their family and in return the rest of the tribe would be protected.
The long version:
There's a scene in which Dr. Loomis and Gary Hunt are investigating a break in at Haddonfield Elementary School which Michael appears to be responsible for, and they find 2 items of interest. Firstly, a picture drawn by Michael of his family, with a knife stuck in the drawing of a girl (Dr. Loomis simply says 'sister'):
Which could be interpreted as him obsessing over his murder of Judith. However there's a revelation that comes out later in the film which makes it more ambiguous:
Marion: Dr. Loomis, please, listen to me. There's a file on Michael Myers that nobody knew about.
Dr. Loomis: I've seen everything.
Marion: No, no. It was hidden, sealed by the court after his parents were killed. After the governor heard what happened tonight, he authorized Dr. Rogers to open it.
Dr. Loomis: What file?
Marion: It isn't fair. They should've allowed you to examine everything. That girl, that Strode girl, that's Michael Myers' sister. She was born two years before he was committed. Two years after, his parents died and she was adopted by the Strodes. They requested that the records be sealed in order to protect the family.
Dr. Loomis: Geez! Don't you see what he's doing here in Haddonfield? He killed one sister 15 years ago, now he's trying to kill the other!
Which right away changes the implications of the original, now the whole film is about him killing one sister, then trying to kill another. This could therefore mean the drawing was actually of Laurie and his intention to kill her, as this would indicate he spent two years with her and must have known they were related.
The second clue found at the school break in is the word Samhain in blood on the chalkboard:
Dr. Loomis then explains it as follows:
It's a Celtic word, Samhain, it means 'The Lord of the Dead'. The end of summer, the festival of Samhain, October 31st.
This will come up again in The Curse of Michael Myers.
Halloween 4: The Return of Michael Myers
This film takes place 10 years after the events of Halloween and starts with Michael in a coma. A lot of information is revealed quite early on when two paramedics are transferring Michael from Ridgemont Federal Sanitarium to Smith's Grove Sanitarium where Michael was staying at the start of Halloween, when they're in the ambulance with Michael:
Female paramedic: Hoffman say anything about living relatives?
Male paramedic: Yeah, a niece living in his home town.
[Michael's fist clenches]
Female paramedic: And?
Male paramedic: And she's too young to be his legal ward.
Female paramedic: So the state owns him? [sarcastically] Great.
Male paramedic: You know I still don't understand
[Michael wakes up and kills him]
Right away there's three major implications of all this:
The fact that they mentioned a niece before a sister is the first time it's implied that Laurie Strode is dead (as closer and older relations take precedence).
It's starting to indicate a pattern: Michael is obsessed with killing his relatives.
There's something supernatural about him, as he was previously comatose with full-body burns for 10 years and instantly started to wake up when he discovers he has living family members.
Jamie Lloyd, Michael Myers' niece, is suffering from dreams and hallucinates about him coming to kill her though she doesn't know it's him at first as she's never met him nor does she know about the mask he is wearing, and on Halloween night when she's out trick-or-treating in a very familiar costume:
Michael returns and takes out scores of people before he's finally thrown from and then hit with a car. When he's on the ground apparently dead, Jamie holds his hand:
After the final scare where he gets up before being gunned down by dozens of people, we return to the Lloyd house where Jamie's mother is about to give her a bath, when Jamie puts on the mask, approaches her and we hear a scream.
Mirroring the original, and suggesting Jamie is carrying on in his place (as he is believed dead), Jamie murders her mother, lending further credence to the supernatural explanation.
Halloween 5: The Revenge of Michael Myers
Jamie is in a mental hospital and is still connected to Michael, she can tell what he is feeling and where he is, and Dr. Loomis uses this to capture Michael once again. At the end of the film, The Man in Black sets Michael free from the jail he was being held in:
Halloween: The Curse of Michael Myers
This takes place six years later and begins with a pregnant Jamie giving birth in a very creepy candle-lit dungeon, after which the baby is handed over to the Man in Black and a ritual is performed on it. After escaping with her baby thanks to a kind nurse, Michael eventually catches up with Jamie and kills her but she had left the baby at a bus station to keep him safe from Michael.
Before she was killed, she managed to make a phone call to a radio station which was heard by Tommy Doyle who Laurie had been babysitting in the first Halloween (also appearing in 4). From what Jamie said on the radio, he was able to find the baby and keep him safe for a while.
Meanwhile Kara Strode (Laurie's adopted sister who happens to be living in the Myers house) and her son Danny are having problems: Danny has been seeing a man in black who whispers terrible things to him. One night after coming home to find her mother missing and Tommy looking after her son and the baby, they all go back to Tommy's house. Due to Tommy Doyle's traumatic experiences he had become obsessed with Michael and had begun to suspect what drove him, as he explained to Kara:
Among the ancient druids Thorn represented a demon that spread sickness brought death to hundreds of thousands of people. According to a Celtic legend, one child from each tribe was chosen to be inflicted with a curse of Thorn. To have the blood sacrifices of it's next of kin on the night of Samhain. Halloween. The sacrifice of one family meant sparing the lives of an entire tribe.
But the Thorn symbol is actually constellation of stars that appears from time to time on Halloween night. Whenever it appears, he appears.
I think that's why these people, whoever they are, are after Jamie's baby. To make it Michael's final sacrifice.
Later, after Mrs. Blankenship (who Tommy rents a room from) and Danny had spent some time together, she warns Kara:
Mrs. Blankenship: He [Danny] hears the voice, you know. Just like the other boy that lived in that house.
Kara: What are you talking about?
Mrs. Blankenship: I was baby-sitting with him that night. Little Mikey Myers that lived across the street. And that's when the voice came the night he murdered his sister.
Kara: Michael heard a voice?
Mrs. Blankenship: It told him to kill his family.
As in all things, The Cult of Thorn ultimately fails to control Michael and he kills most of them himself, before spending the rest of the film pursuing the baby.
It's not spelled out in the film, but as backed up on Wikipedia, the idea seems to be that the Cult intended Michael to kill the baby at which point his entire family would be dead and the curse would be passed on to Danny.
Whether you chose to accept the curse explanation is really at your discretion, but it's the only one given in any of the Halloween movies and it's also consistent with the Novelisation by Dennis Etchison which was released in 1979 and pre-dates even Halloween 2, so it's certainly possible that the story originated there.