My two layouts (the shelf layout Market Street Station and garage-sized Vasona Branch) both are set in 1930's California on the Southern Pacific Railroad. I try to run appropriate Southern Pacific steam locomotives on the layout, usually painting and installing DCC decoders in each. (What is DCC?)
Most of my locomotives are smaller steam locomotives - Moguls, Consolidations, Ten-Wheelers, and the occasional Pacific or 4-8-0. That's a problem as a model builder, for all are small locomotives with small tenders, so shoehorning in the sound decoders I prefer can be a chore. The small size of both layouts and the garage setting for the Vasona Branch means that all the locomotives need to deal with tight curves, uneven track, and lots of dirt. I've got a standard way I install DCC decoders to improve their running.

General Rules

Most of my locomotives have sound decoders - usually Soundtraxx Tsunami decoders with smaller (1" round) speakers. I'll usually install the decoder and speaker in the tender. Speakers get installed in whatever way is most convenient for the tender.
All my locomotives have a Miniatronics 4 pin micro-connector between the tender and engine, allowing me to swap tenders when testing new decoder installs. The plug carries the two wires for the motor, the right-hand-side rail pickup, and a single wire for the headlight. I don't connect headlights to the blue common wire on the decoder to avoid the extra wire between locomotive and tender, but instead ground one wire of the bulb to the body of the locomotive. This causes the headlight to flicker a bit more, but makes installs much easier.

DCC Decoder Installations

Here are some of the locomotives I've installed DCC decoders in.

Lessons learned

So what have I learned from all these installations?
• The hard part of installing a decoder (especially a sound decoder) is routing the wires. There's almost always room for the decoder, but the wires coming off the decoder add a lot of bulk to the decoder; routing the wires neatly and in a way that permits disassembly, is much worse. Think about wire routes, and use tape to secure wires in place when possible. For example, the microconnector for 1234's headlight is actually taped to the top of the gearbox to keep it out of the way.
• Vanderbilt tenders are a bear to install sound decoders in. Invest in a nice mini-torch to get enough heat to unsolder large chunks of brass sheet, and be prepared for other details to fall off as you work.
• In the past, I've found it easiest to use 12 volt bulbs for headlights, with one wire grounded to the frame. The lights are still adequately bright, and one less wire makes installation so much easier. The bulbs are hard to install in small headlight castings, so I've recently started using tiny, tiny surface mount LEDs from the "LED Baron" on EBay. He's selling from Germany, but my order for extra-bright warm white headlights arrived extremely fast.