You could use this for just about anything really provided it has the specs for the task at hand.
File Server
Web Server
VPN Server
Game Server
Streaming Server
Router/Firewall
For the os you can honestly use what ever you want or are comfortable with.
Windows Server
Windows Home server
Something Linux based like Ubuntu, centos7, Debian
Something FreeBSD based like FreeNAS(Perfect for a file server) or pfSense(router/firewall)