There are a number of server errors that can be reported to your browser during connection to a website, but the ones that probably count negatively toward your SEO and rank are those that Google encounters while trying to crawl your site.
When Google encounters an error, it will be reported in Google Search Console in the Crawl section – Crawl Errors.
Those listed may include:
500 – general server error. This is reported when no specific condition is noted.
503 – service unavailable. This is when the website cannot be rendered by the server, often due to overloading.
504 – gateway timeout. This is when the server has not responded within an expected time limit.
This comment from MOZ:
Instead of the problem being with pages missing or not found, this status code indicates a problem with the server. A 500 is a classic server error and will affect access to your site. Human visitors and bots alike will be lost, and your link equity will go nowhere fast. Search engines prefer sites that are well maintained, so you’ll want to investigate these status codes and get these fixed as soon as you encounter them. (https://moz.com/learn/seo/http-status-codes)
Whichever error is reported in Google Search Console, try to resolve the frequency of the errors. It’s almost impossible to guarantee 100% server up-time and accuracy, so expect to find these sorts of errors every now and then, however if they are regular and widespread, discuss your errors with your hosting provider to have them resolved.
If Google encounters these too regularly, it may judge your website to be an unreliable place to send any visitors to, and your site may lose rank.