Adding to Ian's response.
In a MITM attack, the man-in-the-middle won't be able to change the payload to something malicious, hence the checksum is useless.
If the MITM has root certs installed on client's machine, or is somehow able to manipulate the connection, then checksums are ALSO useless, because he can change the checksums that are displayed.
Against a server attack, the same thing should happen, if he already has access to the server, he will be able to change the checksum. But, if the server is split (download server and a server to show the download link/checksum), then it would be better to provide a checksum.
So I think the rule of thumb is: if the server that is displaying the checksum is the same that provides the download file, then the checksum is useless. If you have multiple mirrors, it's a must.
late update/not exactly security related but useful to know:
I have found another valid reason to add checksums, which is for files that are probably going to be archived (for instance, in archive.org) so the users know that the file they're getting is the same as when it was available on your site.
And it also help if you're trying to find an specific version of the file in the internet (considering it's versioned under the same executable name), some mirror sites or archive sites has the MD5/SHA1 of the file available for search engines, so you might be able to find it easier by searching for the hash instead (I have actually came to this specific problem in the past and found it by searching for the HASH).