The easiest way for you would be to use Active Directory Federation Services 2.0.
ADFS2 is a free Windows Server component that offers federation sso services for Active Directory accounts. The sso is based on the WS-Federation protocol which many services use natively (Sharepoint Server, Office365). By bridging ADFS with other identity providers (OAuth, Shibboleth) you can create arbitrarily complex federation scenarios.
I am not sure if SO acts like the identity provider (i.e. you can authenticate agaist it). And even if it does, it would use one of enterprise and widely accepted sso protocols: OAUth2, WS-Federation, Shibboleth, SAML. If you seek knowledge on these, ask, search, read as people use these protocols daily.