As Richard notes, some hardware might not work well (or even at all) on certain operating systems. At this level, this is a fairly fundamental case of the OS deciding (or at least suggesting) part of the server config.
There's also things like what RAM configuration is supported / optimal for certain operating systems (e.g. if you're running 32-bit OS to server a few files then this suggests a very different hardware profile to a 64-bit DB back end.
Things like clustering / virtualisation / high availability configurations also impose limits on hardware choices, even if you don't change the base OS you're doing these things on.
More than just the operating system though, there's also an element of the application that makes an impact on the hardware choice too - as I mentioned earlier, a typical DB host might want more RAM than a file server, and it might also want a more complex disk configuration too.