GO
signals the end of a batch, so this can't be used in the middle of queries.
Instead, reference the tables using the three part name:
Pnl_IL_2012.dbo.IL_Membership
Giving you the following query:
select 'IL' as PlanID, sum(Contracts_Hlth) as PROD_Contracts_Hlth
from Pnl_IL_2012.dbo.IL_Membership
where [month] between '2012-09-01' and '2012-10-31'
union all
select 'NM' as PlanID, sum(Contracts_Hlth) as PROD_Contracts_Hlth
from Pnl_NM_2012.dbo.IL_Membership
where [month] between '2012-09-01' and '2012-10-31'