Very poor uses of luck, most prominent in older games, levels that could only be solved if you were lucky.

It should be very obvious to every game designer to avoid this. Always. Forever. There is no way anyone should ever use it. Period.
So when should luck be a part of the gameplay? There are different ways to employ it correctly:
The Average Approach
An example for this is Diablo, DnD, really almost every Action RPG out there, often strategy games too; as they all randomize weapon damage. Why is this acceptable? Simply because you use your weapon so often that it averages because of the sheer number of rolls.
It also makes the player think, do I want to do 2-7 damage per hit, or rather 1-8?
As I mentioned above, it's not something you actually need to consider, as it averages out really fast, but it makes the player think, and having the player strategizing and thinking about things in-game hooks him to the game on an intellectual and (hopefully) emotional level. Since you had to think about it, you already invested yourself into the game.
This is a way to acceptably use LUCK in your game. This only works if you 'roll' often. Otherwise a single roll can make the difference that makes it frustrating to the player:
[indent=3]Imagine finally getting the atom bomb in an RTS, after being almost overrun since you had to invest all your ressources into this, and then *Poof* nothing happens. Why? The superweapon does 200-9999 damage, and you just happened to roll low. Because of luck, you lost the game.
The other classic example is Critical Hits. These have usually a 5% or lower chance of occuring and are therefore very heavily luck based. Of course it can then be used to give the player a chance to increase his critical hit chance.
The alternative route
This is something that I have hardly seen in games. It basically says that luck depends on the outcome of the mission, but you don't FAIL. It means that the story goes in a different direction, or that you get different missions. This could be used for interesting effect, but it can frustrate the player, since he might not be able to see the story go in a different way when he replays the game.
A possibility to avoid this would be to program the game to automatically have it work out the other way when you replay the game. Say the game notes if you finished with version A, so the next time you will always get B.
To repeat my questions from the beginning: What purpose does luck serve in your games? Is it a part of your game at all? Should it be?
