How do I get Windows to assign a drive letter to my iPhone?
I get a drive letter just fine under XP. Under XP a dialog pops up each time I plug it in, asking how it should be handled. By canceling it ends up being handled as a drive.
My guess is that there's a setting, probably related to cameras and photos, that will change how Windows 7 handles it by default. Unfortunately I've no Win 7 machine handy.

A couple of suggestions from Googling for answers:

Many people have solved the problem by deleting any photos on their iPhone that weren't actually taken with the iPhone. Anything received in email, saved to disk in Safari, etc. After clearing those out the device again appeared as a drive.

Reinstall the iPhone driver in Windows 7 by following instructions from Apple Support.




EDITED TO ADD WIN XP, AS REQUESTED

Getting Windows XP to Present Itself as a Drive-Like Camera
First, the way I have things set up, which may or may not affect how it works for you: I am running all of the XP service packs, updated regularly through Software Update, with no special drivers or applications. My account is an administrator on my PC. iTunes 10.1 is installed, though it is not involved with the camera stuff (it's possible that having iTunes installed does provide some kind of driver, I don't know). My iPhone is a stock iPhone 3GS, non-jailbroken, running iOS 4.2.1. Note that all of this worked identically with iTunes 9 and my phone running iOS 3.0.1.
Event Handling
The first time you attach your iPhone to your WinXP PC a dialog much like the following should appear:

Drive List
If you choose one of the Microsoft Office handlers, the Wizard, or another app like Photoshop, your phone  will not present itself as a camera (more on changing that behavior below). If you click Cancel then the dialog will disappear and the camera will become available.

Windows Explorer Media Directory
If you then double-click on the iPhone icon all of the images and movies are presented:

You can freely drag photos and videos out of the directory. You can drag stuff in, too.
Changing the Event Handler
If at some point you chose an event handler rather than clicking Cancel you can change how XP handles the iPhone. You'll need to get to the phone's Properties, which may require opening the Scanners and Cameras control panel. Click on the dialog's Events tab to see this:

If you change your current setting to Prompt then you'll get that first dialog I showed when you plug in your device. You can also choose Take no action if you want it to always behave like a drive.