I would point out that in one sense, your bars are the same width -- they both extend one unit (e.g. from 1.5 to 2.5). The reason their plotted width is different is that your x-axis extents are different.
So, one way to fix this would be to set the x-axis limits and xtick labels manually to be the same for both plots:
x1 = 1:5;
y1 = [100 800 1800 1700 200];
x2 = 1:4;
y2 = [200 1500 1400 400];
figure
bar(x1,y1,1,'b','FaceAlpha',0.6)
set(gca,'XLim',[0 6],'XTick',0:6)
figure
bar(x2,y2,1,'b','FaceAlpha',0.6)
set(gca,'XLim',[0 6],'XTick',0:6)