Continuity mistake: When Renton goes home with Diane, after they finish having sex, she tells him to get out and leave the room. As Renton sits up, it's very obvious that he's not wearing any protection. Not thirty seconds later, he peels off his condom in the hallway.
Continuity mistake: When the boys are in the hotel room setting up the heroin deal, there is a sink but no mirror above it. Then when Renton steals the money from them, he goes to the same sink and switches a light on above the mirror - neither of which was there before.
Continuity mistake: When Renton visits the Mother Superior and overdoses, we see him remove his belt to use as a tourniquet. He sinks into the floor and Swanney drags him out to a taxi. When Swanney drags him into the taxi however, you can see Renton's belt around his waist. Why would Swanney go to the trouble to put Renton's belt back on if he didn't even put his coat on for him?
Continuity mistake: In the opening scene where Spud and Renton are being chased by the security guards, Renton throws a red brochure away. A shot later it disappears, and reappears in the one that follows.
Continuity mistake: In the opening scene where Spud and Renton are running from the security guards, the shot changes to behind them and there is a crowd of shoppers about 20 - 30 yards in front of them. The shot then changes back to the front as they continue running, but they never seem to reach the crowd in front of them.
Continuity mistake: The opium suppositories dealer's legs change position between shots when he lays on the bed.
Continuity mistake: When Sick Boy is injecting Alison (near the beginning, they're talking about which Bond films are better), Swanney bites Sick Boy's nose. The shot changes and he's doing it again - it's too quick to have done it twice.
Continuity mistake: In the scene where sick boy and Renton are in the park with the bb gun, Renton at some point tracks some runners with his binoculars. He has to move his binoculars drastically to keep up with them, but when you see his front, he's barely moved them at all. They don't do this with sick boy.
Continuity mistake: In the first scene of the hotel room where the big heroin deal is going down, there is no mirror over the sink. In the future scenes in the same room, the mirror magically appears over the sink, notably when Ren gets a drink right before leaving at the end.
Continuity mistake: When Renton is dragged out of the taxi by his feet at the hospital in a drug induced coma, although unconscious, he manages to avoid his head hitting the ground.
Continuity mistake: When the movie begins, the guy with the dyed hair helps Alison inject her dose. Two bits of hair appear and disappear around her ear depending on the angle of the shots.
Continuity mistake: When Spud wakes up to find some, er, "stuff" in his girlfriend's bed, he goes downstairs to where girlfriend's family is eating breakfast. The camera from behind the mother shows her eating a forkful of food, then an instant later (not even a second later!) from beside Spud it shows her eating the food again.
Answer: The generally-accepted answer is that the baby starved to death. This information comes from the novel and isn't explicitly stated in the film. In the book, it is due to neglect (starvation or dehydration) because of the parents' heavy drug use.