Apple - When you charge your MacBook, does it matter which thing you plug in first?
Apple recommends to plug the adapter into the wall before connecting it to the computer.
For more information, refer to the Apple Support article, Using and maintaining your Apple MagSafe Adapter.
Connecting the MagSafe Power Adapter to power
Make sure that the AC plug or AC power cord is fully inserted into the power adapter before plugging the adapter into a power outlet. And be sure to plug your adapter into the wall before connecting it to your computer.
Plugging in a heavy load to a circuit causes arcing as the circuit is completed. Historically, this could damage wall outlets, plugs, adapters, and whatever was connected on the far end of plug (e.g. a computer). This would only happen when the device was in an "already on" condition, as classic devices used physical switches to connect the power supply to the motherboard. The classical advice was to plug in to a wall first for devices that might arc.
Modern devices have soft-switches and lots of protective circuitry, which is why arcing practically never happens and device damage is a lot less frequent than it was historically. The only practical time you might want to plug in to the wall first is if you're in a place that is known for power surges, but then again, you probably wouldn't want to have your device plugged directly into a unfiltered current to begin with (use a surge protector). In most practical cases, it doesn't matter which end you plug in first, but do use common sense.
As hinted at in some comments, the safe procedure when using any electric power converter is to get the converter itself powered up and stabilized first. A wall-charger has caps to filter the load, and these should be allowed to charge up and eliminate any possibility of power surge at the output (the device side).
A well-designed AC-DC converter will have builtin arc and surge suppression, but you never know what you've got in hand. Caution is recommended.
As an extreme example, take a 50-kW Generac. If it's starting cold after disuse, it may take a minute or two to stabilize both the AC frequency and the AC voltage output. If you crossover before starting it up, undesirable transients could damage devices which "dislike" overvoltage or 40 Hz vs. 60 Hz drive.