There are several ways for a Sim to die. This article describes the types of Sim death with tips on how to kill your Sims deliberately with each method.
A Note about Unlucky and Loser Sims
Sims with the Unlucky or Loser traits are immune to accidental deaths. You will see them die and become ghosts, but the Grim Reaper will bring them back to life rather than sending them to the grave. Unlucky and Loser Sims can only die of old age.
A Note about the Death Flower
A Sim with a Death Flower in his or her inventory will be brought back to life by the Grim Reaper if the Sim dies an accidental death. The Death Flower doesn't prevent death by old age, however. The Death Flower will disappear from the Sim's inventory after this.
If a fire breaks out near your Sim and the Sim doesn't get away quickly,
he or she will catch fire and burn to death. The ghost of a Sim that
died in a fire will be an orange/red color.
How to kill a Sim with fire - One method is to have a Sim start something cooking in a cheap oven, then force that Sim to stop cooking while the food is still in the oven. Make sure not to use a fireproof oven. Eventually it will catch fire. It helps to do this in a small room so the Sim can't run away from the flames for long. Another way to kill a Sim with fire is to put that Sim in a small room with a fireplace and a bunch of wooden furniture nearby. After leaving the fireplace on for a while, the room should catch fire.
When a Sim goes swimming, there is a risk of drowning.
A Sim in a swimming pool will normally not drown unless very tired.
The ghost of a drowned Sim will be blue.
How to kill a Sim by drowning - Make the Sim swim in a pool, then build walls directly next to the swimming pool edge so the Sim can't climb out. After a while, the Sim will get too tired to keep swimming and will drown.
A Sim can be electrocuted when using or repairing an electronic device.
The ghost of an electrocuted Sim will be yellow.
How to kill a Sim by electrocution - Turn on a sprinkler, then place a cheap electronic device within the range of the sprinkler spray, then have a Sim turn that device on and off over and over again until the Sim is electrocuted.
Starvation - If a Sim has not eaten in about 48 Sim hours,
he or she will die.
The ghost of a Sim who died of starvation is purple.
How to kill a Sim by starvation - Simply trap the Sim in a room with no access to food and wait a long time.
Age - Once a Sim has reached the Elder life stage, he or she will eventually die. The aging bar will be full, but the Sim might live for many days after the aging bar becomes full. The ghost of a Sim who died of old age will be a grey/white color. How to kill a Sim by old age - You could just wait around for the Sim to age naturally, or you could hasten the process by having the Sim blow out candles with birthday cakes until that Sim becomes an elder. You can only blow out candles once a day for a particular Sim.
Mummy's Curse - With the World Adventures expansion, a Sim who loses a fight with a mummy might become afflicted by the Mummy's Curse afterward. Your Sim will have 14 days to cure the curse. If he or she doesn't get it cured, the screen will get dark around the edge, and evil music plays toward the end of the 14 day span. Once the 14 days have passed, your Sim will die from the curse. The ghost of a Sim who died of the Mummy's Curse is black and white.