StackExchange uses Google Code Prettify (see here) and there is an Orchard module TheMonarch.SyntaxHighlighter that sets this up.
This module uses Google code prettify to add syntax highlighting to Orchard Blog posts. Choose from several themes bundled from the Admin UI. Google code prettify automatically detects most languages.