The choice is really up to you and what you are most comfortable with and best fits your team. There's no "right" or "wrong" stat to favor.
For example, if your team is great on group heals, you might want to go with a pet with higher attack. Since your pet will get healed by another pet, it can focus on doing more damage than getting an attack out first.
If your team doesn't have any group heals or damage reduction abilities, perhaps you might go with a pet with more speed. With a pet that has more speed, it will likely go before your opponent which means you will be able to attack first. That pet might not do as much damage, but since it's going first, it will still have an advantage.
Higher health is always another option, but the way I see it is that unless the other team has pets that can outlast your own by a far margin, the best strategy is to just defeat them as soon as possible. This usually means going for higher speed/attack.
Personally, my choice always falls with the pet with more speed.
Feel free to browse through Perks N Peeves
, my vanity pet collecting blog!