Some people say it is bad, some say it makes no difference. I've done it in the past without anything bad happening, but why take a chance. You can always buy a snap cap to prevent damage or just use a spent hull.
22 cal are the ones you don't want to dryfire, the pin runs strait into steel, however there some singleshot shotguns that I would not dry fire, like NEF's & H&R's they have a pice of metal that comes forward and covers the firing pin, and they will break, there is probably somthing to not dryfiring a centerfire rifle but it's unclear to me what it is, just better not to and be safe.
It's not great for semi autos or pumps as the inertia of the firing pin is abruptly halted by the shank of the firing pin and can break it. It isn't as bad to do on a semi auto or pump as it is on an over under or side by side.