Any firearm is dangerous. However, handguns are used more often in suicide attempts, which account for six-in-ten U.S gun deaths annually (according to PewResearch). While that's not caused by guns, but by suicidal mentalities, it's important to note and take into account because guns DO make suicide attempts more successful, which is why we need to promote personal responsibility and encourage people to temporarily take possession of friends' guns if said friend is feeling suicidal. Handguns are also FAR more likely to cause a self-inflicted accident than any rifle. They're easier to handle and look less threatening, but the small rounds really don't cause massive trauma and are more likely to bounce around inside your body, causing serious internal damage that can be difficult, if not impossible, to repair.
That said, the Glock is also far more useful in that you can carry it concealed. Firearms are used to prevent thousands of potential crimes each year (Between 60,000 and 2.5 MILLION according to the CDC). You really shouldn't carry a rifle around in public, but I am a firm advocate of everyone capable of responsibly doing so taking a concealed carry class and carrying a handgun. They are the great equalizer. Most people don't know jiu-jitsu, and I for one would rather rapists and robbers be scared off or, if necessary, shot than get away with their thuggery.
The AR-15 is a sporting rifle that you can take hunting, defend your home with, use to enjoy a fun day at the range dumping $$ out of 20-round magazines, and always have to know you can be secure in your person, possession, and liberties. It's capable of inflicting great suffering, which is why we need thorough background checks before they're sold to anyone from any commercial source, but it is no more intrinsically dangerous than the person wielding it.
The Glock can't be used hunting (though you can take it anyways to scare off bears....better to do that then resort to pepper spray if charged rather than just trying to scare it off with your voice), but it ensures security of person and property anywhere you go if you carry concealed. When I can legally purchase a handgun I will have one in my car wherever legal and I intend to take a concealed carry class through the sheriff's dept. It too can be used to perpetrate a variety of crimes, and I would argue it's more dangerous overall because of aforementioned qualities intrinsic to handguns, but it's also arguably safer for society. :)