In the DS9 episode Field Of Fire, a prototype TR-116 rifle (which fires bullets) is modified with a micro-transporter to shoot through walls.
O'Brien shows how a micro-transporter could be attached to the muzzle of a TR-116 rifle to beam the bullet close to the target, where it continues its trajectory. With an exographic targeting sensor, the murderer could have scanned through bulkheads, meaning he or she could be firing from anywhere on the station, at anyone. Unfortunately, the micro-transporter does not leave enough of a transporter signature to track back.
One of the most creative uses of a transporter in Star Trek, and points out just how devastating a weapon they would be. This is one of those episodes where a weapon is introduced and never heard from again. I suppose Starfleet considers assassination and sniping "distasteful", but other races and organizations sure wouldn't.
I've come across another use. In TNG Gambit...
Captain Picard appears to have been vaporized by an energy weapon in a bar fight. In reality, the weapon triggered a transporter beam. It's a clever way to kidnap someone while everyone else thinks they're dead; no search party.