Aspen is small, somewhat isolated but gorgeous scenery and hiking possibilities, higher altitude >8000ft. More of a resort type atmosphere in the summer, probably a bit more expensive for food and lodging.
Boulder is a much bigger city (@100k) but has more urban type things to do. The scenery is also nice but not the stunning high mountains of the Aspen area. Lots of easy walks and hikes around Boulder and a fabulous farmers market in the summer on Saturdays, and once a month an art/craft fair along with the farmers market.
I spent a lot of time in Boulder when I lived in CO so I'm a bit partial - would love to live there if I ever moved back to CO. I've only visited Aspen twice, once in winter to ski many many years ago when it was mostly just a ski resort. More recently I spent a couple of nights there a few years ago and really loved the mountain scenery and the hikes.
Both are nice and worth going to.