The holes in impact sockets are for a retaining pin that keeps the socket firmly attached to the wrench, ensuring safety and stability under pressure.