As far as I know, it is not possible to pin batch files to the taskbar in Windows 8. One solution I got from Stackoverflow that works is to use an indirection. I.e., you pin a shortcut that uses cmd.exe to call the batch file, instesad of pinning the batch file directly.
Quoting from http://stackoverflow.com/questions/13202190/pinning-a-program-to-the-windows-7-8-taskbar-using-a-bat-file:
"Create a new shortcut and set the target to: cmd.exe /c "path\to\script.bat". Then you can just right-click and pin it like other shortcuts."