This is not necessary, but, as Lovelin says, if you want to transfer your module / theme to the Drupal CVS repository and share it with the world, you should put the CVS Id tag on the first line of your php, javascript, css and .info.
It should be written inside the comment (the first line of the file), so depending on the file:
For PHP and Javascript files: // $Id$
For CSS files: /* $Id$ */
In the .info file, comment lines begin with ; therefore you should write ; $id$ ; $id$
Further Information in Coding Standards and Header Comment Blocks
source share