If we're counting only programming languages (and not fill-out forms), Prolog had it in 1971, before ML. ASCII didn't include _ until its 1963 draft, so it's probably somewhere in that time.
I'll guess it's probably Prolog, but maybe Planner (Prolog's predecessor) had it too.