It depends on what your role is. If you're off healing, then of course go take some swings. If you're main healing, you have to be careful of a few things. Lots of mobs have AoE's, cleaves, silences etc which will hamper your ability to heal so those mobs are best avoided. However, keep in mind that the closer you are to the mobs, the faster they will come to smack you if you pull aggro. Mage or ranger type mobs don't make much of a difference, but if you're beside a heavy hitter and he swings on you, that blows.
Another consideration, especially with AoE groups, is that having some spacing between ranged/healers and melee also helps tanks to see the trajectory of mobs and who may have picked up aggro. Plenty of times I'll be swiping and mauling and I've got 3 or 4 of the mobs but one will peel off so if I see that I can taunt it back to the group. Lastly, if your tank isn't turning mobs, that would force you to go to the opposite side to do damage placing the melee in the middle of the group with a healer on one side and ranged on the other. If mobs start running all over or if mobs aggro ranged and healer at the same time, that makes it more difficult for the tank to take care of things. Food for thought.