What purpose do traps serve in your games?
The purpose of my traps is very similar to almost all things I do as a gamemaster, to make a living and breathing world. They need to have a creator, and that creator had to have a reason. They need to be logical. For example, why would an ancient tomb still have a dart trap that works? There are ways around this of course: magic, non-rusting mithril gears, cogs, and chains, etc. If I go down that path, then it's - did the owner of that tomb warrant such things? Same goes for traps in heavily trafficked areas. For example, the door to the pirate captain's rum room is trapped. Depending on the severity of the trap, it seems like a great opportunity for the drunk captain to trigger it himself. Which is silly. Since that is the case, I would place a more benign trap there. Maybe something that alerts the captain, or better yet, having the bottle of rum with the Jolly Roger on it laced with some mild poison.
Magical traps are a bit different, but they still need to have a creator and a history. They still need to make sense, at least in the creator's eyes. A demi lich in a tomb filled with undead can have tons of traps that deal necrotic damage because it won't hurt his minions. But to have something that shoots fireballs seems silly. Why would the demi-lich risk the chance of killing his guards and collapsing his tomb? (Unless it was some end game trap where he wanted everything buried.) And that is the point. A gamemaster could probably come up with a reason for any trap that has some logic built in. But unless the players buy into that logic, then it has a chance of being faulty.
In the end, traps need to make sense and must help create the world and its lore.
How do you implement them?
They are implemented where there is a logical need for them. I once built a dungeon that was the resting place of an ancient king. He was known, and embodied in the lore of the area, as incredibly strong. People actually whispered his name when they needed strength, from recovering from an illness to moving heavy things. The temple's traps were all built around strength. There was always a way to get around them - if you were strong enough. The temple had also been buried in a sandstorm for over a hundred years. So some of the traps were there, but the sand had jammed them. This made for interesting areas that PCs couldn't get to, but once they could, the trap became functional. (In one of the two cases for this, the PCs were clever enough to keep the sand around the door trap from moving, while moving the sand they needed to open the passage.

)
For me, consistency in logic, lore, and history are key.
How do you feel about traps as a player?
I really like them. Obviously, puzzle traps are more fun. But a solid mechanical or natural trap that I didn't see coming is super fun. I may hate its consequences, but as a player, I am glad for the surprise. Ones that are used for attrition of resources can be good too, but again, they need to be logical. If there is a pit trap at the outside of a cave where the thieves hide out, it seems stupid to me. Someone, at one point in time, would trigger it accidentally long before an intruder does. Traps that are dormant, yet can be triggered by someone, seem much more cohesive in situations like that.