I think there is obviously some cost increase due to material costs. You have to figure that artist salaries have increased, so that also factors in. I couldn't find the article, but I remember reading a while back that circulation per issue is also just a fraction of what it was in the late 80's and 90's when comics were booming. If they are selling considerably less then Econ 101 says you have to drive up the price to maintain profit levels and offset overhead costs.
All that said, I'm sure that the profit margin per comic book has increased over time. Most successful manufacturers have internal stated goals to grow profit margins. Not just the penny profit, but the actual percentage of the item price. If Marvel and DC were making 20% margin a few decades ago, it wouldn't surprise me to find that margins have doubled or tripled since then. 20% of $.25 is just $.05 an issue, whereas 50% of a $3 book is $1.50. That's a huge difference.
Things like better coloring, more durable materials, etc. do add something to the comics, but that tactic seems very similar to the pack-ins for Hasbro figures. Hasbro throws in a droid part or a figure stand or a coin as something of a bonus or improvement versus just selling the figure, then increases the cost by $1 as partial justification. They would have raised the price somewhat anyway, but by adding something of minimal value, consumers feel like they're actually getting something for the added cost. I'd bet improved comic materials are a relatively small increase in cost, but work the same way in helping consumers feel like they're getting something extra to justify cost increases.
Personally, I was buying comics back when they were $.45 to $.50 and remember my frustration when they increased to $.75 and $1.00. Decades later, $2.99 doesn't feel too bad to me, but I have a lot more disposable income now than I used to.
I will say that I've dropped a few titles that recently moved to $3.99. When the cost is starting to approach the price of a novel or a DVD then I really have to question the value of something I'm typically done with in ten minutes.