The summation is working correctly. The 'w - w_eg - k.*w_0' is a symbolic expression since it contains a symbolic variable. The reason why you are not getting the wrong values might be because of the 'Interval' and the 'MeshDensity' chosen for 'fplot'. Consider the following code for plotting your function:
D = 1;
w_eg = 1;
w_0 = 1;
syms k;
som = @(w) symsum(exp(-D).*D.^k.*kroneckerDelta(w - w_eg - k.*w_0)/factorial(k),k,0,100);
subplot(2,1,1)
fplot(som,[0.1 10],'MeshDensity',100)
title('input values: 0.1000, 0.2000, 0.3000, 0.4000, 0.5000, 0.6000...')
subplot(2,1,2)
fplot(som,[0 10],'MeshDensity',100)
title('input values: 0, 0.1010, 0.2020, 0.3030, 0.4040, 0.5051...')
It seems like the function being plotted is very sensitive to the input and thus to see the peaks you need to experiment with the 'Interval' and the 'MeshDensity'. I suggest you go through this section for more clarity.