Good answers here already...
I'll add my two cents worth. ( Though I guess that's a nickel now we ditched the penny in Canada. )
When prototyping the first go around of a board and your confidence level is not that great in the design or PCB, sockets often make debug and rework a lot easier.
With a socket, you have the ability to quickly "lift" a pin. That is, remove the IC from the socket, bend out one or more pins, and put the device back in the socket. That way you can easily isolate sections of the circuit and or feed in test signals without frying something.
It also makes rework to change the design a lot easier. e.g. change logic, add series parts etc. Use the same lifted pin method and fly-wire as need be.
As others have mentioned, you do risk having poorer connections, so it is prudent to buy better than junk-store sockets, but for early design work, they can save you a lot of time.
Once your design and PCB is verified though, drop the sockets for everything other than programmed parts that may change in the future.
I usually keep the first off socketed board as a gold standard in case I need to add features or debug some weird field issue down the road.