It's different for each wallet but here are the top ways.
You put a fee on USD->BTC and vice versa. Downside of this is that you can exploit the user using the delay created by using fiat and banks, Coinbase purportedly buys bitcoins when user buys, then a few days later takes bitcoin and refunds (by marking transaction as "suspicious") user if price goes up and holding is profitable.
You gain revenue from allowing services to put links on your website. Downside to this is that you can't just advertise more if you aren't making the hosting costs.
You gain revenue from often your own services, basically your just a free wallet that the owner supports himself. No real downside. Inputs.io used this, revenue gained from CoinLenders, ultimately "hacked" which makes you wonder the motivation of a non-profit wallet service.