Depending on your jurisdiction, which could be city, college, county, or state, officers may have no obligation to wear identification at all, let alone disclose it on request.
According to Slate, many states do not require police officers to wear a badge as a matter of law. Instead, the regulation of police officers and their badges are mostly left to the individual police departments.
Some states, however, have their own laws with regard to uniformed officers wearing badges. For example:
In Massachusetts, uniformed officers are required to wear a "badge, tag, or label" identifying their badge number -- but not their name.
In California, uniformed peace officers are required to wear a "badge, nameplate, or other device" that clearly displays the officer's ID number or name.
It should not be assumed, however, that every (or even most) states or municipalities have similar laws.
While some state laws and department policies may require a uniformed officer to display a badge or nameplate, they may not require the same of plainclothed officers. Undercover cops exist in just about every urban setting, and no, these officers do not have to tell you they are cops.
While the badge is a time-honored symbol of law enforcement, it may not always be a necessary part of every officer's uniform or dress.