I hail from Gurdaspur, Punjab and did my BTech in CSE from IIT Patna(2013-17). I have spent my childhood in Punjab, then 2 years of IIT JEE coaching from Kota, Rajasthan. After getting Patna as destination of my life-long dream, even I got terrified. You must have heard scary stories related to robbery, theft in Patna, but frankly speaking it is a complete different picture there.
Regarding your safety concern, it is completely safe to roam around in Patna. Since the market outside IIT Patna campus is not much developed, so you will definitely like to visit Patna on weekends. Patna has got a much better picture as compared to the presumed one. In my four year experience, I did not found anything uncomfortable and unsafe to tell you.
The IIT Patna campus is a beautiful campus built across 500 acres. Even though a large part of the campus have not developed yet, but it is sufficient for you to enjoy your B.Tech life. You have full freedom to roam in campus vicinity around the clock. Cricket ground, Basketball court, Table Tennis and many more things are available for your entertainment.
Last but not the least, the computer science department of IIT Patna is very hard working and burgeoning day by day. They have clubs that will keep you motivated to achieve great milestones in your stream. All in all, I would recommend you to go ahead and join it. You will definitely have the best 4 years of your college life. Right now I am working in Noida and still I recommend you to go to IIT, Patna.