A lot of time you hear things like "late 2008 models" or 'Mid 2010 macbooks" etc. I know some users are not too sure which exact model they have, they will know it's an iMac or Macbook etc but not the year model.
Here is a couple of ways you can find out.
From here click on the "Online Service Assistant". From here you will need to enter in your Hardware Serial Number and the country where you bought the device. If you are unsure where to find your serial number then l suggest you read this article which shows you how to find your serial number.
Once you have entered in your serial number etc, you then see a screen like the one below.
From here you can see that this iMac is a mid 2007 model, you can also see you have several options available, if you are having an issue with the machine.
This isn't really a way to find out, it's more of a way to store the information. If you navigate to http://supportprofile.apple.com, this will then allow you to sign in with your apple id. From here you can register all of your apple products by using the serial number.
Once you have your products registered you can then see which model you have as well as your Warranty coverage details, case Activity, Repair Activity and a wide range of support resources relevant to your apple product.
I am always interested in feedback so please feel free to add any comments, or you can mail me here. If you would like to submit a quick tip with full credit and links back to your site then also feel free to contact me.
One little addition to this is that now on Lion for some machines it displays this information once you have selected the "More Info" when in "About this Mac".
As you can see for my iMac is displays Mid 2007, however on my Macbook pro is doesn't show me this, it just says Core 2 Duo.