Mart Muller wrote a great tip about creating alerts programatically:
In some cases you want a user to automatically create alerts on particular lists, for example an action list. It's very easy to achieve that:
SPWeb thisWeb = SPControl.GetContextWeb(Context);
thisWeb.AllowUnsafeUpdates = true;
SPList myList = thisWeb.Lists["ListName"];
// in this case a daily alert on all list actions
thisWeb.CurrentUser.Alerts.Add( myList,SPEventType.All,SPAlertFrequency.Daily);
thisWeb.CurrentUser.Update();
The same way, alerts can be added for list items.