While translating a technical document I began thinking about socket and outlet. It seems like they're mostly interchangeable. Is that correct? Or is there a difference between the two?
The other answers are being too specific. A socket is something into which something is plugged or fitted (also called a receptacle). An outlet is something that something comes out of.
A light socket is called a light socket because a light bulb is inserted into it. A power outlet is called an outlet because power comes out of it. It could conceivably be called a power socket but this is not usual and is possibly confusing.
Neither of these examples is intended to imply the power doesn't come out of a light socket or that a plug isn't plugged into a power outlet. Those are facts but not related to the terms in question themselves.
If you are in any doubt that context is not enough, just use light socket and power outlet.
I want to add one more comment, eight years later. It's also not usual to call the thing that's installed in your wall a receptacle. In this context, usually the speaker is referring the literal piece of equipment installed there that receives the plug. In other words, you're mostly talking about what the form of the thing is (a hole for a plug) and not what it does (outputs power).
If you're talking about the endpoint of a logical network connection (such as Berkeley sockets), only the term 'socket' is used. These are never called 'outlets'. Only physical endpoints are ever called 'outlets'.