Let's go with comparing the operating system, since it's the main factor that we want to look at (the hardware will continue to change significantly, rending previous generations obsolete. It happens every week or two...).
Android - Open source. There are more free applications on the Android Market, and customization is substantially higher than that of the iPhone. There is more flexibility in terms of programs, widgets, and even the kernel. Android allows you to change everything about it, whereas iOS is essentially a walled-garden. You have the options to add Adobe Flash Player, change the interface, and depending on the device, install different flavors/ROMs/versions of Android that would change the overall user-friendliness to usefulness ratio.
The main downsides of Android include the fact that it's open source. Because of that, ANYONE can make an application for the platform and submit it to the market. Some of these applications can be infected with viruses/malware that could affect the overall performance of your device or do malicious activities (keyloggers, trojans, etc...). Also, Android requires a much higher level of available resources to be able to run smoothly due to it's foundation: a Linux kernel. If you want the operating system to flexible to suit your needs or personality while ignoring the fact that the platform is less refined, go with Android. There is a wide variety of devices that range in specs and design, and will serve your needs.
iPhone runs only iOS. The platform is much more refined and smooth. Apple basically tries to make sure that everything works perfectly without any hiccups in the programs. The kinetic scrolling is the smoothest of any mobile device, and the amount of applications available in the App Store is astounding. iOS has the disadvantage of being customizable to the user's liking, being limited mainly to folders and wallpapers. Yes, I know about jailbreaking and how it opens up a whole new world for the iPhone; I am talking about the stock OS running on the device considering the fact that if someone was tech-savvy enough to jailbreak and customize their phone, they wouldn't need advice for picking one.
The applications available for iOS are on average better than those that you would find in the Android Market due to Apple's fairly strict acceptance policy towards developers' submissions. This guarantees you more functionality with less irritations when using the device.
The iPhone also has an advantage in terms of build quality, as Apple has a well-known habit of making sure everything they make is high-grade. Right now, the iPhone 4 is made of a stainless steel band and reinforced glass. Many Android phones are made out of a high grade plastic, but not much more. Note that because of the wide array of Android phones around, it's not difficult to find one that has a similar design and craftsmanship to that of the iPhone.