Excited hydrogen and the formation of molecular hydrogen via associative ionization – I. Physical processes and outflows from young stellar objects