Here's how: If you have the iPad's screen locked, press and hold the Home button. After a few seconds the battery charge percentage will show up next to the 'Charging' icon in the top right of the screen.
[crarko adds: I tried this with a first-generation iPad and it did nothing. However, going to Settings » General » Usage and turning on the 'Battery Percentage' slider makes the charging level always visible. Does the iPad 2 behave differently?]

