They're both solid camera; a few differences I've noticed:
(1) Batteries - The Pentax takes 4 AAs. While you have the advantage of being able to buy them cheaply in any store, they also don't last that terribly long in most cameras I've seen that use them. The EN-EL3 in the Nikon is an incredibly durable battery - I get over a thousand shots off it on average (using the flash maybe 5-10 percent of the time). Its only flaw is that it lasts so long that I forget to charge it (I bought a spare specifically for that reason).
(2) LCD - the Pentax has the larger one here, although the D50's 2" LCD is quite large enough for all usage I've ran into. After all, you're not composing shots on teh thing, just reviewing them.
(3) The Pentax has ISO 3200, but I've yet to see a review of how it performs at ISO 1600 or 3200. Things tend to get pretty noisy up that high, although in my experience the D50 is one of the best cameras I've dealt with at 1600.
(4) Speed: The Pentax has 2.8FPS vs. 2.5FPS. Nothing I'd notice, but if you shoot in continuous mode a lot you might be able to tell a difference.
(5) Exposure Compensation - The Nikon goes to +/-5, the Pentax to +/-3. It's not common for me to go more than +/-2 when I'm normally shooting, but there have been times when I've had to use -4 or +5 in rare, strange circumstances, and while it's not enough to make this a true selling point, it's been nice having the option.
(6) Remote - Among people who often use remotes, I've heard some complaints about the D50's inability to use a wired remote. If wireless just doesn't cut it for you and you need a remote, get the Pentax. Myself, I haven't found the need for a remote yet and when I do I suspect wireless will be just fine.
(7) Self-Timer - if you use this a lot, you'll like the customizability of the Nikon. The Pentax is listed as having only two modes: 2s and 12s, neither of which sounds terribly convenient to me.
(8) Weight and feel - If you could hold both, I would. The Pentax is listed as being smaller and lighter. While that may SOUND great at first, you really have to hold it to know. The Canon 350D is also smaller and lighter, but I couldn't get used to the feel of it in my hands (they're reasonable large). The D50 felt much more natural and solid to me, but the feel of a camera is very much personal. I know plenty of people who love the feel of the Canon and feel that the Nikon is too bulky. You really have to hold them both in a store to tell what's best for you.
In the end, though, they're both great cameras. I love my D50, but the family point-and-shoot is a Pentax Optio 555 that's a stuning camera as well. Good brand.