Here is a nice derivation of how an we get the exponentiated operator to generate translations:
Consider the differentiable function f at x. Translating f to the right means changing the argument to get f(x-a). Now take the displacement a and cut it up in N pieces, each piece having length Dx. Hence N Dx = a. The translated function now reads f(x-Dx-Dx-...-Dx), where there are N Dx's. Take the definition of a derivative and rearrange it to read:
f(x-Dx) = f(x) - f'(x)*Dx
= [1 - Dx (d/dx)]f(x) in the limit as Dx ---> 0
Doing this procedure to the translated function gives us
f(x-a) = [1 - Dx (d/dx)]f(x-a+Dx)
= [1 - Dx (d/dx)][1 - Dx (d/dx)]f(x-a+2Dx)
= [1 - Dx (d/dx)][1 - Dx (d/dx)][1 - Dx (d/dx)]f(x-a+3Dx)
...
= [1 - Dx (d/dx)]^N f(x)
= [1 - a/N (d/dx)]^N f(x)
In quantum mechanics we learned that -i*hbar (d/dx) = p, the momentum operator. Hence we have
f(x-a) = [1 - iap/N ]^N f(x)
We now allow the number N to approach infinity, which basically means that we are subdividing the original interval a into an infinitum of infinitesimals. We then utilize the definition of the number e to see that
f(x-a) = exp(-iap)f(x)
Read from right to left, we have just discovered that the exponentiated momentum operator, when applied to a function, generates a translation. A similar thing can be done for the anguilar momentum operator, but you will need to consider a function of two variables, f(x,y), and examine how both x and y change when the function is rotated.
Now back to the Hamiltonian, H(x). How do we derive its transformation properties under translations? Consider the state vector |psi(x)>. To find the energy of this state we take the Dirac bracket of the Hamiltonian. The enregy of this state is independent of the origin of the coordinate system that we use, so we have
E = <psi(x)|H(x)psi(x)>
= <psi(x-a)|H(x-a)psi(x-a)>
= <exp(-iap)psi(x)|H(x-a)exp(-iap)psi(x)>
= <psi(x)|exp(iap)H(x-a)exp(-iap)psi(x)>
By examining the first and fourth lines we are lead to the transformation properties of the Hamiltonian
H(x) = exp(iap)H(x-a)exp(-iap) or H(x-a) = exp(-iap)H(x)exp(iap)
Now we do what the last post says. We invoke the translational invariance of the Hamiltonian, H(x)=H(x-a), expand the transformation law derived above to first order, and voila! We have the commutation ralation between the Energy and Momentum operators.