If you know the number of states the system can be in (number of configurations) then you can see that if you compare this with the volume of phase space of that system you get some sort of constant. We can call this constant h.Volume of phase space is just another way of saying what is the number of states system can be in. This number is obviously somehow connected to the probability of finding the system in one of the states..In clasical physics, the constant h can be whatever you want because in classical physics number of states is actually infinite...But in quantum physics, this is not so...So when you compare W (number os states) with L (total phase space) what you get is this constant to the power of 3N where N is the dimension of the phase space that is a configuration space in which every point of space represents one state of the system in this way: you represent position and momentum of each particle and you do it for all of the particles. So element of this phase space (volume element) has the dimension of momentum times position which is (energy) x (time) . So this constant that you get for quantum system has the dimension of for example Js (Joulesecond) which is exactly what you need in your exponent. So this is how h (Planck constant) comes in play here. It is sort of conversion factor betwen total number of states and the volume of phase space which is just another way of expressing the number of states.
Also,quantum of energy is just hv so there is that. Exponent you are talking about is a measure of all the states in a narrow range of hv.