This can happen for several reasons but our particular reason was this was a development server that was unfortunately put up as quickly as possible. We had inadvertently used a local admin account to run one of our Application Pools and it ended up causing the Application Pools to disable themselves causing the Service Unavailable error below:
Once I went into IIS and checked the App Pool accounts I saw the below on two of our App Pools:
The App Pools that had a red X on them I right clicked and went to properties and looked on the Identity tab (see below) and changed it to a domain admin account.
Once this was changed I went to each App Pool and right clicked and selected Recycle:
Once I recycled the App Pools the site and Central Admin were back up and running. It may be a good idea to go ahead and run an IIS reset but is up to you. You also need to ensure that the service account you’re using to run your application pool is in the IIS_WPG group on your server.
If you have changed the application pool account after your SharePoint installation you may want to try running this:
Run the following command (from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727)
aspnet_regiis.exe -GA domain\username
Where domain\username was the domain-qualified username (in the standard Windows format) of the user I was using for the app pool’s identity.
From the aspnet_regiis help, the -GA option does:
Grant the specified user or group access to the IIS metabase and other directories used by ASP.NET.
**Although your issue may not be specific to this problem the “Service Unavailable” error is notoriously an issue with your Application Pools. **