I was getting the Access Denied page when I tried to access the UsersCollection of a SPGroup Instance or SiteGroups of SPWeb object.
I used RunWithElevatedPrivileges to be able to access the users collection but all in vein.
After searching through the net, I found that all code should be inside elevated priviledge, because if we access SiteGroups from a SPWeb object that was created prior to using elevated priviledge, the problem would still sustain.

So, I changed my code to define the objects inside elevated priviledges like:

SPSecurity.SPWeb (delegate()
{       SPSite ospSite = SPContext.Current.Site;
        SPWeb site = ospSite.OpenWeb();
……code to access users
}

The code was still giving errors because Context, SPContext or SPControl.GetWebContext, etc. cannot be used inside elevated privileges. The reason is that Context object is created before the code with elevated privileges is executed.

So, the change will be:

 string siteUrl = SPControl.GetContextSite(Context).Url;
        SPSecurity.RunWithElevatedPrivileges(delegate()
  {
        string Globaltbl = string.Empty;
        using (SPSite ospSite = new SPSite(siteUrl))
        {
            using (SPWeb oWeb = ospSite.OpenWeb())
            {
                    SPGroupCollection groups = oWeb.SiteGroups;  
                    foreach (SPGroup grp in groups)
                    {
                        SPUserCollection users = grp.Users;
                        if (users != null)
                        {
                            foreach (SPUser user in users)
                            {
                                //MyCode//
                            }
                        }
                    }
}
}
});

And Voila! everything works just fine.