For the most part, it is a crapshoot.
I will limit my comments to eBay where I buy and sell somewhat often.
Repaints and weathering do not increase prices. If anything, they turn away some interested buyers.
A lot depends upon the time of the year, the road name, the type of locomotive or rolling stock and the number of interested, potential buyers.
The best months to sell are December through March, and the least productive months are May through October.
Obscure road names sell slowly and the most well known road names take a little more time than the less well known road names. Road names such as NYC, PRR, ATSF and UP for example are popular, but eBay is flooded with those road names.
Freight diesels sell better than passenger diesels or switchers. Steam locomotives still sell quite well.
In terms of rolling stock, cabooses linger on eBay forever. Boxcars flood the eBay listings, as do tank cars. Hoppers, gondolas, reefers and covered hopper sell well.
One other issue is brand. Atlas is a good name and sells well. Athearn is popular as well. Bachmann sells well especially the Spectrum line. Broadway Limited Imports do well with certains lines but not so well with other lines. Then, there is Walthers, Walthers Proto, the old Life Like Proto 2000, etc.
Of course, price is king. If it is overpriced, it lingers. If it is underpriced, usually something is wrong with the item. Auctions sell faster than Buy It Now, but usually return a lower price than Buy It Now, except where two bidders compete and jack up the price. Seller feedback rating is crucial.
This is all based upon my experience. If this thread goes on long enough, you will get one hundred different opinions.
As I say, it is all a crapshoot.
Rich