"Daniel" means "God is my judge."
The lions were very hungry, and Daniel was supposed to be lunch!
So Daniel's punishment for praying to God was that he would be thrown to the lions. Now is that fair? Well, a cool thing about Daniel is his name. Daniel's name means "God is my judge!" Who was judging Daniel right then? The wicked princes! The wicked princes were judging Daniel, but if God was judging Daniel, would God say about Daniel? Would God say Daniel is worthy to die for praying? The wicked princes may judge Daniel, and be able to throw him to the lions, but Daniel's real judge is the God of the lions!
Now, I've seen people walk around in immodest outfits that say, "Only God can judge me." Do you think those people pray three times a day? Probably not. What they mean when they say "Only God can judge me" is that they are going to do whatever sin pops into their head and they will pitch a hissy fit if anyone tells them to behave. Was that Daniel's attitude? No. God is your judge whether or not you wear a tee shirt that says, "Only God can judge me," and if any of you guys wear a tee shirt like that, I'm going to ask you if you are praying three times a day, like Daniel.
I'd be very afraid to wear something that says "Only God can judge me," because I would be afraid that He might go ahead and judge me! And I'm not perfect! I mess up all the time, and I need His mercy every single day. That's why the Bible says that we are saved by grace! I repented, and I am baptized, and I've received the Holy Spirit, but every single day, I need His grace. I am saved by grace, and I need it every single minute! I try to do the best I can, but my best try falls far short of His glory, so I am saved every day by grace while I do my best to live for Him.