You’d say it when something is really great, whether it is a person, a thing, a place etc.
In other words, the thing is so good that you would be willing to spend money on it.
It is a famous catchphrase said by the character “Bixby Snyder” in the movie Robocop, 1987. During his line, he is usually surrounded by good-looking women, and the catchphrase is often a sexual reference.
The catchphrase seems to be inspired by the 1951 science fiction story “The Marching Morons”, by Cyril M. Kornbluth, where a similar phrase; “Would you buy it for a quarter?” is said in a similar situation.
However, the catchphrase “I’d buy it for a dollar” was a running joke, created specifically for the Robocop movie.
The catchphrase is greatly celebrated by the Robocop fanbase, and many seem to especially remember that one line from the film.
On Youtube you can find multiple 4-10 second videos with the particular scene where Bixby Snyder says his famous line, exclusively.
The catchphrase has also been made into memes, with either a cut out of the original movie, or the catchphrase added to other images.