I am afraid there are several varieties of hole in the head and I am not sure which one you are referring to.
The commonest form is when a part of the top of the skull is removed during surgery and not replaced. This is done when the pressure in the head is very high and there is danger that the central part of the brain - the brainstem - may get compressed. To prevent this disastrous complication, an outlet is provided in the top of the head that allows the brain to bulge outwards, under the scalp. This takes the pressure off the precious brainstem.
Such a hole can be repaired once the pressure within the head returns to normal after treatment. Either the preserved bone (removed earlier and maintained in a sterile condition) is replaced or new bone (from one or more ribs or bone from the top of the bony pelvis).
Provided there is no residual disease in the brain or the bone, there is no reason why a person with a hole in the head cannot get married and live happily ever after. In all fairness, it is important for him to inform his prospective spouse of the operation and the hole in head before exchanging rings.