When a power or other effect allows a creature to make a basic attack, the creature can make either a melee basic attack or a ranged basic attack. If the power or other effect specifically calls for a melee basic attack or a ranged basic attack, the creature must use that type. For instance, a power might read, “Each ally within 5 squares of you can make a basic attack as a free action,” which means each of those allies can make either a melee or a ranged basic attack, and they can each do so as a free action, rather than a standard action.
Some classes provide alternatives to these default powers, and each monster has its own basic attack power, which is noted in its stat block with a circle around the power’s icon.
A creature uses a melee basic attack to make an opportunity attack or to make a charge attack. Even if it has no weapon equipped, it can make a melee basic attack using an unarmed strike (such as a kick or punch) or another improvised weapon.
A creature can make a ranged basic attack as long as it has something to throw or shoot. Even if it has no ranged weapon equipped, it can make a ranged basic attack using an improvised weapon. If it makes the attack using a weapon that has the heavy thrown property, the attack uses the creature’s Strength instead of Dexterity for the attack roll and the damage roll.
Published in Player's Handbook, page(s) 287, Rules Compendium, page(s) 238.