Convert the percentages to a ratio: 94 / 6 = 15.7 So for every 1 part Hydrogen there are about 16 parts Oxygen.
Remember these ratios are based on atomic mass.
Use a periodic table to check the masses of H and O
H = about 1
O = about 16
Therefore the empirical formula in this case is very easy. There is 1 H for every 1 O.
The empirical formula is: OH (or HO, I don't think it matters)
Just as another example: If the H % was 12 and the O % was 88 then the ratio would be:
88 / 12 = 7.3 so for every 1 part H there are 7.3 parts O.
Remember the Atomic mass of H = 1 and O = 16
You can't have 1/2 an atom in an empirical formula and 7.3 is about half of 16. Therefore you'd need to multiply the 1 part H to 7 parts O by 2 to not have a half atom in your formula. This gives the ratio of 2 : 14.6 which is pretty close to 2 : 16 and that tells us that the molecular formula would be 2 H's for every 1 O. Or H2O