Hitpoints or HP, are generally a visual indication to the player on just how much damage is being done to a robot or its components. The number of hitpoints also determines how much damage is needed before a component can fall off: (there are very few exceptions in stock). For example, stock ramplates have a value of 1000 HP. This means that after 1000 points worth of damage has been dealt to the ramplate, it will snap off of the robot using it, rendering it useless.
Hitpoints are shown in both DSL and RA2 as green or red numbers to indicate that a component has dealt or taken damage, but only if a human player is one of the opponents. From your bots perspective, green numbers indicate how much damage your robot is dishing out (per hit) from its weapons. Red numbers indicate how much damage your robot's weapons are receiving from either the opponents weapons or from the arena. A useful tip is you would want to always go green and never go red when your bot fights, if you want to preserve its weaponry.