In a perfect world, there should be at least one foot between the freestanding bathtub and the adjacent wall. Keep in mind, though, that the space around the bathtub is intended to give the impression that the bathroom is bigger than it is.
When putting in a freestanding bath in a small bathroom, you might get away with only two or three inches of space.