The two easiest ways, but take a bit of time, are drowning and starvation.
Drowning: put the Sim in a pool and put a fence or shrub all the way around it so they can't get out then wait till they get to tired to swim anymore...
Starvation: put the Sim in a room and remove the door and wait till they starve, it takes a while, but it is pretty simple. Both of these methods do not require any cheat codes if you are willing to wait. However I did find this cheat, I did not use it but I am assuming it will speed up the process a bit.
Cause death by starvation: sims.add_buff hunger_Starving
Death by Fire was the one method I had the most trouble with and my primary reason for writing this post because I am not the only one having trouble getting my Sim to start a fire... I kept making various Sims cook who had no cooking skill with a very cheap stove and yet they never started a fire... I also tried using a fireplace with a rug in front with no luck... Finally I remembered I had been playing with a different Sim household the other day and my Sim had started a fire by accident so, I decided to use the same exact oven and sure enough it worked!!!
**Here is the exact specifications, for starting a fire with an oven this worked twice for me!
Stats.set_skill_level Major_HomestyleCooking 1
This method is the most unsettling to watch... Keep in mind if you chose to lock your Sim in the kitchen other Sims in the house will not be able to put the fire out. I had two Sims in the house when I did this and one I forced to go near the oven once it was on fire and the other I made stand in the yard outside until the first Sim had died then my other Sim put the fire out. Be careful not to unintentionally kill other Sims.
I ended up using cheats for the other Death options. I tried to electrocute a Sim without a cheat and it wasn't working, they managed to repair the object without getting hurt... Ha-ha!
Electrocution: Wait till an electronic item needs to be repaired (refrigerator worked for me, buy cheap electronics because they are more likely to break quickly) select the Sim you want to electrocute, use this cheat, then have them repair it twice. This cheat will give the Sim the DAZED emotion.
Cause death while fixing electric item:
*WARNING* With each of the following cheats make sure you have the correct Sim you want to kill selected before entering the cheat. Each of the following cheats will give the selected Sim a heightened emotion that can/will cause death! (Type Control + Shift + C to open cheat text box)
Death by Anger (Cardiac Explosion): This one took a bit after using the cheat, the cheat made the Sim angry, then I had to make all the other Sims and her be mean to each other for a while before she finally died.
Cause death by anger: sims.add_buff buff_Enraged
Death by Overexertion (Elders): Although this method states for elders I used this cheat on a young adult Sim and they died within a minute of using cheat.
Cause death by exhaustion:
Death by Hysteria (Laughter): This method was quick, I used the cheat, Sims started to laugh and was done for!
Cause death by hysteria: sims.add_buff buff_Hysterical
Death by Embarrassment: Also easy, Sim died within a minute.
Cause death by embarrassment: sims.add_buff buff_Mortified
There are three more methods that I have not used yet, death by old age (working on this one), Sim gets eaten by a cow plant and crashing in a rocket ship. The last two methods require time and building skills.