GameObject atlasGameObject = Resources.Load("name of your atlas") as GameObject;
UIAtlas actualAtlas = atlasGameObject.GetComponent<UIAtlas>();
UISprite sprite = NGUITools.AddChild<UISprite>(objectInYourUItoAddTo);
sprite.atlas = actualAtlas;
sprite.spriteName = "Some Sprite";