It seems both allow close up shots of a subject but what are the differences both physically and in use cases?
A screw on diopter filter with a positive index number refracts light from a narrower angle of view before it strikes the front element of the original lens. It obviously adds another lens element to the optical path of the light reaching the film/sensor. This will affect overall image quality to one degree or another, depending upon the quality of the screw on adapter. Other than the minute amount of light absorbed or reflected by the additional glass there is no loss of brightness, but because the size of the entrance pupil is affected by the change in magnification of the front element, the effective f-number of the lens is changed. (Screw on diopter filters with a negative index number refract light from a wider angle of view to give a wider field of view, but are outside the scope of this question.)
An extension tube, which normally contains no additional optical elements, works by increasing the distance between all of the elements of the lens and the film/sensor. This does not affect the image quality of the original lens (it may, however, make defects in the original more obvious). Since this effectively 'stretches' the image circle that is projected on the film/sensor and by moving the film/sensor plane back allows closer focus it increases the maximum magnification of the lens, but it does so at the expense of brightness since some of the light is lost to the part of the expanded image circle no longer being projected onto the film/sensor.
As far as use cases go it is really more a matter of personal preference and available resources:
Logistically there are differences as well. Extension tubes are fitted to the rear of a lens. Thus they will work with any lens compatible with the lens mount for which they are made, regardless of the filter thread size of each lens. Combining extension tubes allows a variation in the amount of magnification gained (and brightness lost) as well as the closest focusing distance. A typical set of three extension tubes in lengths of 12mm, 20mm, and 36mm allow each to be used alone or in combinations to create seven lengths ranging from 12mm to 68mm (12, 20, 32, 36, 48, 56, 68). Screw on diopters, on the other hand, can be used across platforms as long as the filter threads in the front of the lens are the same size. Step-up and step-down thread size adapter rings introduce additional optical issues when used with screw on diopter filters.