The first thing to decide is how to detect damage done to the vehicle. If it's destroyed, chances are the player is too. If it's hit by small-arms fire, chances are the player won't need to bail. Thus a hit event handler might involve too much detection of the type of 'hit' to be practical.
The next option is a slowly looping script which detects whether the vehicle canMove. If it can't, the damage is sufficient to force the player to abandon the vehicle even if it's not destroyed.
So. Call using vehicle_name exec "check_vehicle.sqs"
; variable passed to script
_vehicle = _this
; slow loop
#loop
~5
? (canMove _vehicle) : goto "loop"
; vehicle is sufficiently damaged
; black out
cuttext[" ", "black out", 2]
~3
; all black, stop the vehicle momentum (to prevent player dying on eject)
_vehicle setvelocity [0,0,0]
; get the player out
unassignvehicle player
player action["eject", _vehicle]
; black in again
cuttext[" ", "black in", 3]
; all done
exit
Naturally the script is only of any use when the player is actually in the vehicle calling the script. That should be enough to get you on the right track though.