Honestly depends upon your needs and what hardware you have laying around.
If you have the spare hardware to build a box, then the cheapest monetarily by far is any of the *nix flavors.
If you dont have the hardware and your needs are relatively low, you could get by with setting up a NAS with those capabilities. I personally set up a DLink DNS-323 (has print server, File sharing etc.. and ITunes playlist sharing capabilities.) for less than $500, no OS install needed. Of course I did also install Twonky on the thing so I could do connect to computer with my Xbox and stream media files to the living room.
Lastly if you need the oomph and have the money, grab a copy of Windows 2k3