Maybe not. When you write a story, you're asking the reader to invest time and a certain level of emotional involvement in that story, and that means making them care what happens to the characters. Killing a character for a good reason is one thing, but killing them off just to show that you're willing to do it can leave your reader feeling betrayed, almost like they've invested time in a relationship and then found out it could never have worked out.
So what constitutes a good reason? I heard a writer at the Pikes Peak Writer's Conference (and I wish I could remember her name!) articulate the best rule I have ever heard: you kill off a character to change the motivation of another character. That works for me. But I would also say that if possible, it should not be as simple as their death making the protagonist mad for revenge or anything like that. Certainly you don't want a female character to get horribly slaughtered just to motivate the male hero to a blood rage (a.k.a., "Women in refrigerators syndrome"). I always thought killing off the First Lady in Independence Day was really just a milder variant of shoving her body into a refrigerator. She wasn't seen as necessary to the story (she didn't fly a jet) and her death, conveniently staged in her husband's presence, motivated him even further to kill those nasty aliens.
I think it works better when one character's sudden, abrupt absence actually changes the other character's circumstances. Maybe now they have to support themselves, rule the country, face their fears, go on a quest, whatever.
Of course, in spec fic, an added complication is that magic/advanced technology may make it possible to bring the dead back to life. I don't mean zombies (I am pretty much sick of zombies already, and they are just now posed to be the new vampires. Ugh!). I mean that spec fic writers have to be careful they don't make death meaningless. That happened on STAR TREK TOS a little bit and TNG even more so. The damn transporter got too powerful! If it basically copied a person's molecules and could spew out a copy on demand, no character ever needed to stay dead.
So, have you ever read a book and gotten really angry at the author for killing a character? Or have you seen an instances of too-powerful-transporter syndrome? Alternatively, have you ever ready a story and thought (as was said at my writer's group recently), "Really, the author should have just killed off x?"