I'm not sure I understand what you want to do.
Listing content by tags or other data is clearly work for Views.
If you want to alter the content somehow, take a look at "Views bulk operations", which helps you "do things" to the nodes listed by a view.
If you really need to access CCK data in code then I suggest you read this blog:
http://www.drewish.com/content/2010/06/correctly_accessing_cck_fields_in_sql_querieswhich will give you some info on "doing it right" and an example.