D's glasses are to treat strabismus its not a strong prescription, but the theory is that his eyes have been over-focusing. Sometimes his left eye is turned inward and sometimes his right is turned inward like in the pictures below. Strabismus can be treated surgically, or with eye patches as well. There is no real proof about what works, its usually a lifetime thing that you keep working at. Our neighbor across the street has strabismus and has been helpful to talk to. We'll try glasses for a few months and if there isn't any improvement, the next option is usually surgery.
They determine the prescription for babies with a little machine that looks in the eye and uses light and shadows and geometry. Pretty amazing.