\frac{l}{g} \sf{\mbox{has units}} \frac{[m]}{[m/{{s}^{2}}]}=\frac{[1]}{[1/{{s}^{2}}]}=[{{s}^{2}}]
\frac{m}{k} \sf{\mbox{has units}} \frac{[kg]}{[N/m]}=\frac{[kg]}{[kg\cdot m/{{s}^{2}}/m]}=[{{s}^{2}}]
The only further operation is a square root which gives [s].
\omega =\sqrt{\frac{g}{l}}
makes sense since we would think the higher restoring force from a higher “g” would make a pendulum go faster, while a longer pendulum is know to vibrate more slowly
\omega =\sqrt{\frac{k}{m}}
makes sense since a stiffer spring vibrates with higher frequency, while a larger mass being pushed by a spring moves ponderously.