How do I work out what temperature to use when desoldering?
Desoldering in theory should utilize the same temperatures as soldering. Flux present during soldering helps reduce the required temperature. The same is true for desoldering, apply some flux to remove contaminants.

The melting point (per Weller) for various solder compositions is as follows:

Tin/Lead        Melting Point °C (°F)
--------        ---------------------
40/60           230 (460)
50/50           214 (418)
60/40           190 (374)
63/37           183 (364)
95/5            224 (434)


Please note, these temperatures are melting points, not recommended soldering or desoldering iron temperatures.

Most guides recommend starting with the lowest temperature that will work in a short amount of time. This is a matter of opinion, but generally no less than 260°C (500°F).

The following factors will greatly affect desoldering performance:


The type of solder used (lead-free requires higher temperatures)
The age of the board and amount of contamination
The number of layers in the board
Size of ground/power/thermal planes connected to joint being desoldered
Mass of component, leads, heatsink, etc.


For example, desoldering a small through-hole component with small traces on a 2-layer board is much easier than desoldering the same component on a multi-layer board with large copper pours connected to the component. A larger component with more mass will require more time or more heat.

Think of it this way, if you set your temperature to 370°C (700°F) (a starting temperature recommended by Weller), the mass of solder and copper closest to the iron tip will heat quickly, but it will take some time for that heat to spread. If you are desoldering something with a heat sink or a ground plane, the extra mass will conduct heat away from the area of interest, and you must either apply the iron for a longer duration, or increase the temperature. The danger is that you may damage components if you exceed their temperature tolerance.

The Hakko 808 desoldering gun (which I use) ranges from 380-480°C (715-895°F). It does a remarkable job for most things, but I've occasionally needed to preheat a board for stubborn components that have a lot of mass or are connected to a heatsink.

Your temperature selection of 400°C (750°F) seems good. You could start at a lower temperature since you have the option, depending on the above factors.