For a number of years, BMW's have not followed the naming scheme (as mentioned by Hyperi0n above) where the last two numbers of the model represented the cars engine size (also used by Mercedes-Benz as well - although they also no longer always follow the scheme). The first number still always represents the series, however the cars engine size is not necessarily related to the following numbers.
All non standard models (e.g. Touring, Sport etc) are assumed to have the same engine size as the standard specification, unless otherwise stated in the non standard specification. For the cars with the badges removed (of which there are many in the UK), a basic test is the exhaust - the smaller engine sizes have a single tail pipe, the higher models have twin pipes.
The Z3, Z4, Z8, and X5 do not appear on this list as they do not follow the accepted naming scheme.
Update: The information now applies to the 2004 reissue of the 5 and 7 series, as well as including the long awaited remake of the 6 series.
3 Series Compact:
- 316 : 1.8L
- 318 : 2.0L
- 320 : 2.0L
- 325 : 2.5L
3 Series (standard specification):
- 316 : 1.8L
- 318 : 2.0L
- 320 : 2.0L
- 325 : 2.5L
- 330 : 3.0L
3 Series (non standard specification)
- 320i SE : 2.2L
- 320i Sport : 2.2L
- 320i Sport Touring : 2.2L
- 320d SE Touring : 2.2L
- 320Ci : 2.2L
- 320Ci sport : 2.2L
- M3 : 3.2L
5 Series (standard specification)
- 520 : 2.1L
- 525 : 2.5L
- 530 : 3.0L
- 535 : 3.5L
- 540 : 4.4L
5 Series (non standard specification)
- The M5 is awaiting release (May 2005), with a 5.0L V10
- 545 (V8) : 4.4L
6 Series (standard specification)
7 Series (standard specification)
- 730 : 3.0L
- 735 : 3.6L
- 745 : 4.4L
- 760 : 6.0L
Model information correct for October 2004 line up.
Source : Top Gear (June 2003) / Test Drive + Top Gear (October 2004) Thanks to TallRoo for the suggestion