[caveat: I live and work in Boulder.]
Boulder is a better place for the hardcore cyclist in my opinion. It's a very liberal city so be ready to get hit up for money for environmental extreme left-wing causes at every turn. Politics aside it's a great place to be on two wheels.
From downtown Boulder you can find yourself on some serious 10%+ mountain grades in approximately 10 minutes (via bike).
From downtown Denver... good luck biking through some non-cycling friendly streets and the occasional bike path for 30 minutes before getting to anything scenic.
Boulder is a medium-ish town of 110,000 people (give or take 20,000 when CU-Boulder is in session) whereas Denver is a city of ~1.5 million (incl. suburbs). That said, Boulder is about 15 miles northwest of Denver so they are not all that far apart.