There are some good articles about diopters at the Scubageek website. They're written from a scuba photographer point of view.
In short, diopters are used to modify focusing range. They also modify focal length, but not how you might expect. Diopters in macro allow closer focusing for greater magnification. They sometimes provide greater magnification at a given distance, too, but that's actually caused by how the lens focuses internally. Diopters are not required for macro but are frequently useful.
Dome ports are another matter entirely. Scubageek has an article on dome optics that is worth reading, too. The short answer here is that the lens behind the dome must be capable of close focusing but far focusing (including infinity) is of no use. If the lens meets the close focus requirement, no diopter is used. If not, the diopter providing the least power necessary is used. For any given lens/dome combo, there is a proper diopter choice and the dome manufacturer usually specifies it.