Clearly, these passages are telling us that it is not a good idea to lust after riches for their own sake. They are not necessarily saying that it is bad to be well off. However, it is bad to have an excessive desire for wealth.
For example, Paul's letter to Timothy puts the greatest emphasis on contentment. In our society, we often hear part of this passage (verse 10) misquoted to say that money is the root of evil. But Paul is not saying this. He is saying that the love of money is where problems come from. We need to be relatively content with what we have (though we probably should not, considering the parable of the talents, simply say that what we have is good enough and not try to become better and wealthier) rather than always thinking about how we can get more.
The main idea, then, is to not get distracted by the desire for wealth but to remember what is really important in life and try to be content.