Ants aren't typically trouble for plants themselves. They do like sweet things, of course, and would be attracted to the fruit but I've not seen them destroy plants themselves.
Could be aphids. The honeydew produced by the aphids is something the ants like. Ants have this interesting relationship with aphids. The aphids produce the honeydew and the ants like it and in return the ants protect them from predators.
Could also be the nectar that they like. Nectar is sweet, of course, (it's one of the ingredients in honey) and they may be drawn to that, particularly if they are down in the flowers.
Will they pollinate them? Maybe. Raspberries are "self fruiting" and can produce their own fruit but honeybees (the common pollinator for raspberries here on our farm) help to ensure the best possible fruiting by moving that pollen from the anther to the pistil. Ants could do that too, assuming they brush up against both parts.
I'd check for aphids but they're usually on the underside of leaves. Natural predators like ladybugs or lacewings will work but you've got to have them handy to really combat the aphids. I'd avoid any use of diatomaceous earth on the raspberries though, as this will harm honeybees too. A little soapy water is effective against them, as is the time-consuming by-hand removal of them.
But, it very well may be just the nectar they've found. And if so... no worries that I can see.