if you removed some old pages while forgetting to clean up the links pointing to those pages or if you change your file structure and leave some legacy links behind means broken links According to Google Webmaster Guidelines it may harm your ranking, try to avoid broken link by using some broken link finder tools
Broken links affects SEO negatively. So it is advised to remove the links/urls of the pages removed from a website.
Broken links are those links that do not work because the destination has been deleted or the path has been changed.
According to Google WebMasters guidelines you should “Check for broken links and correct HTML.†So, broken links will definitely will affect your PageRank. here you can read about the ways I"m using to check dead links.
Thanks to all for giving info about Broken Links but is it give bad effect in seo? if it is gonna indexed than i don't think it is harmful to website.