The verse is from Matthew 6. Jesus tells us not to lay up treasures on eart were rust and moths and thieves will consume it. Rather lay up treasures in heaven.
He then explains how the light of the body is the eye. Personally, the best I can make of that in this conversation (that Jesus is having) is not to chase after lust of the eye. In other words, be content with food and rainment... Not chasing after material things that disrupt you spiritual life.
He then says you can't serve God and mammon (money).
It may be easy to shun money and wealth based on these few verses alone. I don't think that was Jesus's point. Otherwise we should all quit our jobs. Its about seeking first the kingdom of God, then all these things (specifically he said food and rainment) would be added unto you.
I recall Paul talking about laying up treasures in heaven also. In Philipians 4:17 he says he didn't desire a gift but desired that fruit may abound to their account by their giving.
1 Tim 6:17-19... Paul charges Timothy to address people with riches not to trust their riches, but that they be ready to comminicate and to distribute. In other words, be givers when the opportunity arises. In doing so they will they will lay up a good foundation against the time to come and set themselves up to lay hold of eternal life.
A couple of key points: 1. Paul didn't tell them to give up their riches; just to not trust them and to be givers and be ready to be givers. I failed to mention this earlier, but he also charged them not to be high minded. In other words, don't be a snob. Second, the reason for giving in at least one of these instances was to support the spreading of the gospel.
Another good point is that in 1 Tim 6 Paul said they should trust God and God gives us all things to enjoy.
There is alot more to it, but in summary, I don't believe Jesus was saying its wrong to be rich (certainly not prosperous) but we must put God first. We are also to be givers. If you are blessed financially, bless others by being a giver: both to spread to gospel and to relieve others of financial shortcomings. But first to spread the gospel.