I've recently taken an interest in both rock climbing and mountaineering. Both require a harness, but is there any difference in the harness used for each activity? I understand that the most basic functionality will theoretically be the same, i.e. be securely attached to you and have a sturdy loop you can tie/clip into. I'm interested in knowing what differences there are beyond the most simple functionality though. If I were to purchase a harness, what types of features would I be looking for that would lend themselves to climbing vs. mountaineering or both?
There are many types of specialized harnesses, including harnesses for sport, trad, and mountaineering. Personally I use the same harness for trad and mountaineering, and it works fine.
For trad climbing, you want four gear loops. Since people don't carry such heavy racks for sport and mountaineering, some harnesses specialized for those activities may not have that many gear loops.
For sport climbing, there is no real need to go to the bathroom while keeping your harness on. For mountaineering and multipitch trad, this becomes more of an issue, especially for women. Some harnesses have leg loops that are easy to drop or release for this purpose.
For mountaineering, you need to be able to put on your harness while wearing boots and possibly crampons. For this reason, it may be more convenient to have adjustable leg loops.
For trad it's pretty common to have to hang on your harness for a long time while belaying. That's going to be more comfortable if you have wide, padded leg loops.
Keep in mind that people used to just tie in with a bowline on a coil. Manufactured seat harnesses are a relatively recent invention. Some people who prefer a light and fast style of mountaineering just use a loop of webbing that they can make into a diaper sling.
To add to Ben Crowell's answer, some additional differences between mountaineering and rock-climbing harnesses include comfort while hiking, and weight.
Compare the two harnesses below; the first is for alpinism/mountaineering, it's simple, light, and very minimal in size and bulk. A harness like this would be extremely comfortable to hike in, and wouldn't be that uncomfortable to wear with a backpack, you can see how quick and easy it would be to put on and take off as well. There are some harnesses on the market that are even more minimal than this one, they aren't designed to be comfortable while being sat in, they're just supposed to be there to protect you incase you or one of your team slips on a traverse or falls into a cravass.
The next harness is at the other side of the spectrum, this is a big wall harness made for being sat in for extended periods of time and carrying lots of gear and tools. This harness would be very comfortable to sit in and hang all of your pro off of, but it's pretty bulky, so if you were to try and hike in it you'd notice it a lot, and would probably chafe your legs and it'd be really uncomfortable under the waist belt of your backpack.
If you're planning on getting pretty serious into both activities I'd recommend getting a good trad harness (the big wall harness I show above is super overkill, better for aid climbing than most trad), and then buy a second harness for mountaineering (or just carry some webbing like Ben suggests). One big advantage to buying a light and simple alpine harness, is they're also a lot cheaper, so you can actually get one for cheaper than one of your cams.