Zero carbon fuels can be used to reduce CO2 emissions from internal combustion engines. Hydrogen is an important zero-carbon fuel that can be used as the primary fuel for spark ignition (SI) engines or in dual-fuel operation in compression ignition (CI) engines. The combustion properties of hydrogen often result in high combustion temperature which produces harmful nitrogen oxides (NOx) emissions. To reduce NOx and soot emissions from hydrogen fueled engines, an engine can be optimized using a hardware-in-the-loop (HIL) setup to reduce calibration efforts for the engine. In addition, optimal model based combustion control (MCC) can reduce engine-out emissions. Both of HIL and MCC techniques require fast and accurate NOx and soot emission models. The accuracy of a fast physics-based engine model with pre-mixed combustion is dependent on predicting the laminar flame speed (LFS). In this study, LFS is predicted using an artificial neural network (ANN) machine learning (ML) method. Then the LFS model and engine combustion model are validated for both an SI hydrogen engine and for a CI hydrogen-diesel engine. Next, black-box and gray-box soot and NOx emission models are developed for the hydrogen-diesel engine using ANN, support vector machine (SVM) and Gaussian process regression (GPR) methods with different feature-sets and compared with the a common one-dimensional physics-based NOx model. The developed gray-box emission models can predict NOx and soot emissions with an Rtest2 value of higher than 0.99 which makes them suitable for engine HIL setups where accuracy is very important. On the other hand, the black-box emission models can predict NOx and soot emissions with Rtest2 value higher than 0.95 with a run time thousands of times faster than the gray-box models. This makes the black-box models suitable for model-based real time hydrogen combustion control where limited computational power is available.