Any of the more popular preset systems provide tag combination -> icon mappings in one way of or another:
- iD https://github.com/openstreetmap/iD/tree/master/data/presets
- JOSM format: https://josm.openstreetmap.de/wiki/Presets https://josm.openstreetmap.de/browser/josm/trunk/data/defaultpresets.xml and https://github.com/simonpoole/beautified-JOSM-preset
Further the map styles have similar rules (but tend to less complete as they need to reduce the amount of information they display to be practical).
In general, before embarking on a larger coding exercise, I would recommend getting acquainted with how OSM tagging works and in general with the data model and the pitfalls you are likely to run in to when creating your application.