Their early music has a strong punk base, as they started to figure out what they really were. But, the best way to describe early U2 is that it is punk with a soul. While the drum and bass set a punk vibe to the music, the guitar was more experimental and Bono's vocals were much softer than the drug-fueled craziness of true punk. The lyrics themselves were about as far away from punk as possible---whereas punk was generally angry commentary about the world, U2 focused on themes that were more introspective, and even spiritual.
But if you listen to Boy, October and to a somewhat lesser extent, War, there is a definite punk feel to these albums.