Look in to InDesign's DOM (Document Object Model), and specifically at Paragraph Style properties: ParagraphStyle
In there you can find a property "styleExportTagMaps" – a plural, probably because you can add multiple tags to a single style (?). Browsing to that, you get StyleExportTagMap , which, in turn, has a simple string property called "exportTag".
So if style points to a valid Paragraph Style, you can do this to add either a tagName or a className to it (only one of these; you must set the other to an empty string):
style.styleExportTagMaps.add({exportType:"PDF", exportAttributes:'', exportTag:tagName, exportClass:className});
I've only used this with an exportType of "EPUB", but if I'm remembering correctly "PDF" is 'the' other option.
I haven't used those exportAttributes before. If you want to find out what it can contain, set a number of options in the user interface for a random style and then read out the styleExportTagMap of that style to see what values it holds.