If the flag is not your own flag, it can be considered vandalism, which is illegal.
Additionally, it is in violation of "Flag Code" contained in Federal Code. Violation of Flag Code is; however, not a punishable act.
To read the "Flag Code," visit the Related Link.