We've been to both Cabo and Cancun multiple times for the last 20 years. Cabo has much more of a night life atmosphere that Cancun. Maybe it's the closeness to Southern California attracts a lot of persons so inclined to party. Cancun and the Maya Riviera is mostly all-inclusive resorts (for couples, weddings,, friends trips) but it does have a few larger night clubs. It is much easier to leave the resort in Cabo and go to the clubs (and tourist areas), everything is fairly close. Cancun is a large city that is much more spread out and more of an ordeal to go to the clubs than Cabo. Playa del Carmen (south of Cancun) has nice tourist areas and smaller Clubs/bars. Maybe look at Breathless Cabo? Some resort in Cabo are a short taxi or walk from come of the resorts, not so in Cancun.
Its hard to say with out knowing the group. I agree with mexico24 but would add that Cancun is much better if you plan on spending time in the ocean. If that isn't a big deal to you for a group of guys looking to party for a few days Cabo is hard to beat. Also know there is Cabo San Lucas and San Jose Del Cabo. If you are going to party you don't want to be in San Jose Del Cabo you definitely want Cabo San Lucas.