Everyone recommends that you set up custom 404/410 pages, so that if someone lands on the page, they have somewhere else to navigate towards when looking for something.
There is nothing worse than sending a user to a blank 404 page and then just leaving unhappy.
But is there a purpose for Google SEO reasons to have these custom 404 pages? Not really. Google won't look at any of the content or links on those pages. They will just process the 404 or 410 status code and leave. It won't pass any link juice, it won't be used to judge your quality. It will just be crawled for the 404/410 status response.
Google's John Mueller said on Twitter in response to a question on this:
We ignore everything on pages that return 404/410 when we crawl them - make them work for your users.
@Albatross19 We ignore everything on pages that return 404/410 when we crawl them - make them work for your users.
— John Mueller (@JohnMu) January 18, 2015
This is common knowledge for most of you guys but hey, good to have it documented again.
Forum discussion at Twitter.