It shouldn't make any difference. Assuming you have a regulated supply, which is virtually always the case with a cell phone, then if you plug the charger in first, followed by the cell phone, then of course the charger will have a regulated 5v at its output. This probably is how must people charge their phones, plugging the charger in first.
But if you plug the phone into the charger, and then plug the charger into the wall, there will not be any harmful voltage spikes, because 1) the charger is going to ramp up from 0 to 5v, and not start at some higher voltage and drop to 5v; and 2) the time it takes to go from 0 to 5v for most switching regulators is usually significantly less than a millisecond.
If you have an unregulated supply (not for a cell phone, but some other electronic device), then the "no-load" voltage of the power supply may be significantly greater then the rated voltage; for example 9v for a 5v supply. Here it may make a slight difference what order you plug them in.
If you plug the power supply in first, it is going to be at (say) 9v, until you plug in the electronic device, and then its load will bring the supply down to somewhere around its rated 5v. Note in this case, you will always be starting at a higher voltage than the rated voltage since the power supply has already plateaued at the no-load voltage.
If you plug the device into the power supply first, and then plug the power supply into the wall, then there may or may not be a temporary spike above the rated voltage depending on the load imposed by the electronic device. Since you are starting from 0 instead of the no-load voltage and ramping up, the device will certainly be subject to an over-voltage condition for a shorter period of time.