Diopter is simply the inverse of a lens focal length, in meters.  If you have a convex lens with a focal length of 2 meters, it will have a diopter of 1/2, or +0.5.  If you take this lens, and hold it so the sun shines through it to form a bright spot on the wall, that spot will become a point when the lens is 2 meters from the wall.  If the lens focuses light into a point when it is 4 meters from the wall, it has a 4 meter focal length, and a diopter of 1/4, or +0.25.  If you are farsighted (presbyopic), and cannot see close up, you will typically use a convex, or positive diopter lens to help you read.

Convex Lens Convex lens = positive diopter

Negative diopter values are concave lenses which do not bring incoming light together, but rather spread it apart.  You can take the diverging beam coming out of a negative diopter lens, calculate where they would have come from, if you had not used a lens, and thereby calculate the theoretical 'negative' focal length of the lens.  These lenses are prescribed for people who are myopic, or nearsighted.

Concave Lens Concave lens = negative diopter

Diopters are additive.  If you hold a +0.50 lens and a +0.25 lens in front of each other, you will get the same effect as if you were looking through a +0.75 lens.  This is why lenses can help you focus.  Your eye is approximately 20mm in diameter, so if you are looking at infinity, the lens of your eye is effectively a 50 diopter lens.  When you are young, you can exert the ciliary muscle in your eye to flex the lens to add up to 4 diopters to the lens.  This effectively lets you focus as close as 1/4 meter, 25 cm, about 10".  As you get older and get presbiopic, the lens gets hard, and you can no longer add 4 diopters, you can maybe add only 2 diopters.

In order to focus at 25cm, you need to flex your eye to add the 2 diopters it is capable of adding, and you need to add a +2.0 diopter lens in reading glasses, restoring your ability to focus close.  The problem is if you now try to look at the horizon, you can relax your eye to relax the 2 diopters, but you still have the 2 diopters in your lens, so the horizon looks blurry.

For shooting, the correct distance to focus at to split the depth of field equally between the front sight and the target is called your 'hyperfocal' distance, and by lens math it is defined as 2x the distance to the nearest object you want to see.  Since an AR has a 20" barrel, and you have about 2" of eye relief (22" total), the hyperfocal distance is 44".  This is 1.12meters.  If you want your eye to remain in the fully relaxed state while shooting (ie it thinks it is focussed at infinity), you need a lens which will let you focus at 1.12 meters.  The inverse of 1.12 is +0.89, so if your eye is relaxed and exactly focussed at infinity, you theoretically need a +0.89 diopter lens to add to your eye's relaxed lens.  Obviously, every eye is different, so you actually need to test to determine the exact value that works for you, but in general shooters find that around a +0.75 works best if they can see infinity without correction.

If you have other vision correction needed to see infinity, the +0.75 value would be added to your correction.