New York, Early 2000s
We know what you're thinking: "Oh, New York. How original. No one's ever done a movie in New York before." But, really, this location was important to Gondry. In fact, the movie was originally going to be shot in Canada for budgetary purposes, but Gondry fought to film it on location in New York because he wanted it to feel as authentic as possible (Gondry actually still lives in New York not too far from some of the filming locations.) The city and the beach together provide a sort of bleak blankness, punctuated only by Clementine and her colorful hair.
But the more interesting setting in Eternal Sunshine is Joel's mind. It's a surreal place where things don't always make sense, since it's a manifestation of Joel's memories and thoughts rather than reality. Well, you could call it a reality, but it's a reality defined by Joel's impressions, which means it's pretty much a reflection of Joel himself.
The transitions in the dream are odd and spontaneous. When the important action of one memory is over, the memory is erased and we find Joel in the subsequent memory, sometimes with Joel being pulled from the memory, like when he's flushed down the sink and pops up soaking wet in a car outside a drive-in theater. Joel's mind also has a very distinct, individual feeling to it, and that's highlighted by the slightly unnatural lighting of each scene.
It also plays tricks with our perception as well. Besides shifting back and forth between eras in his life and specific incidents that may or may not have happened the way he remembers them, it messes with our perspective too. Look at the scene where Joel remembers being a kid playing in the rain…complete with an adult Joel moving through an oversized set with Clem as one of his mother's friends.
It gets pretty weird, and that's kind of the point. The movie is trying to remind us that memories are tricky things, which can be fluid like mercury and shift from one second to the next. Attempting to pull one thread out of it—like, say, an ex-girlfriend who hurt you—is an exercise in absurdity. In this case, the setting serves a specific dramatic purpose as a reflection of the hero's personality, and the dilemma he's inflicted on himself by trying to make the pain of Clem's memory go away.