Melee damage is the value in Age of Empires games for how much damage a unit inflicts at close range. With the exception of attacks bonuses, damage dealt by units in Age of Empires and Age of Empires II remains constant regardless of the type of unit. However, in Age of Empires III most ranged units have a seperate melee attack. Melee attacks have different damage and different damage multipliers than a unit's normal ranged attack.
If you have advanced formations turned on for your units, then you can switch a group of ranged infantry, such as musketeers, to use melee attack. This is useful if you want your musketeers to attack horses, for example, because their melee attack has a damage multiplier against cavalry, while their ranged attack does not.