I think it can depend on where you live, your means of protecting them from predators and your tolerance for poop and eaten flowers, etc.
I live on the prairies and we have our share of predators, but I have a rooster who's not afraid to take on threats (my small dog avoids the barn now because of a couple of incidents). I also have two big dogs that help keep wild animals away. There was some teaching involved because each one killed a chicken last year, although they didn't maul them... I think ran them to death to be honest. But they're good now. The chickens make their way into the barn at night and I shut them up. I'm sure a predator could get in if they were determined but the dogs probably prevent that. Personally, I love having them loose. I've had them for over a year and other than the dogs, no losses. But I accept that it could happen.
The Pros: watching them happily pecking and clucking and crowing, richer more delicious eggs, less food to buy, living as nature intended.
The Cons: eggs aren't consistently laid in the same spot, if they get too friendly they will start congregating around your house which means poop where you don't want it and flower beds scratched and eaten, you might lose some to other animals.