Sometimes this means that the battery needs to be re-calibrated. Try to completely drain the battery until it has absolutely no charge left in it. Then try to charge it back to full life. This may or may not help depending on the severity of the battery malfunction. For other iPhone battery hints and tips feel free to read the Hub I published recently.
How To Save Battery Life on the iPhone