Best to be implemented in javascript.
And easy to use.
Stack Overflow uses Prettify from Google.
See this question (on meta) for more discussion about this.
SO are using the WMD editor.
Googling for "javascript syntax highlighter" also brings up a lot of useful stuff.