Not only are you at risk of losing potential sales from website downtime, but you are also at risk of harming those well-earned search engine rankings. For this reason, it's often worth investing in a server monitoring service to make sure that know you immediately when your website suffers from an outage. And, if you use Google Search Console (if you own a website either you or your web developer should be using it) Google will send you an email if your website is unavailable either regularly in a small space of time, or for a long period of time.
It seems that Google do understand that events outside a website owner's control, such as a server outage, can happen - from our experience, if you occasionally suffer from unexpected downtime for a small period of time, Google will not penalize you. However, John Mueller, a Webmaster Trends Analyst at Google, recently weighed into a conversation on Twitter about website downtime, declaring that websites that are down for too long would be removed from Google's search results. "We're patient, but users are going to blame us for leading them there," he said in reference to a website that had been unavailable for two months. Mueller then refused to answer questions about just what period of time was "too long" for a website to be unavailable before it would be removed from search results.
We can deduce from this exchange that websites which are unavailable too often for Google's liking will ultimately be removed from it's search results. This would suggest that websites that suffer from short, but frequent, periods of downtime may find that their rankings in search results suffer. This is because, as Mueller stated, Google does not want to take the blame by sending the user to an unavailable website. However, whilst the website in question attempted to follow Google's own recommendations for scheduled downtime, which is to return a "503 HTTP" status code (meaning that the downtime is intentional and only temporary), it did not do this correctly, so we can't be sure whether this would have prevented it from being removed from Google's search results.
The lesson we can take from Mueller's conversation on Twitter is that you should attempt to minimize the amount of downtime your website suffers from. If your website host is unreliable, you should strongly consider either upgrading your package or switching; and if you need to take your website offline for maintenance work you need to make sure you do this as quickly as possible, while returning a "503 HTTP" status code for pages which are unavailable. It is interesting to note that websites using various popular publishing platforms, such as Wordpress, fail to return the correct status code during software upgrades.