This is a Status plugin for Grid, so Grid is required to use this addon. For pet support you must have Grid r58645 or later which can be found on wowace.com.
I've seen people request bringing in the Squishy feature where it highlights the person you should be healing based on a priority system. Maia & Pastamancer's stance seemed to be to have someone else write it as a seperate module, so I made the attempt. This is my first mod so be kind.
What it does
It keeps track of the first and second priority units and highlights them with colors so you know which unit could use your healing the most.
Download and install Grid
Unzip the file into the Addons folder just like any other mod (do not install it in the Grid folder).
When in game, right click the Grid icon and make sure the Heal Priority: 1st and Heal Priority: 2nd status modules are enabled.
Then go to frames, then border, and enable Healer: First Priority and Healer: Second Priority and disable the other statuses.
Instead of only going by health percentages, the following statuses are used to weight the unit:
Is In Combat (focus heals on the warrior who is trying to get aggro rather then the warlock who hasn't engaged)
Is In Range (filter out people you can't heal due to range)
Is In Party (heal people in your own groups first)
Is Main Tank (prioritize if the unit is a oRA/CTRA main tank)
Is Focus Unit (prioritize if the unit is the player's focus unit - /focus)
Is Out Of Mana (lower priority on healing mana users as they get close to being out of mana)
Has Aggro (prioritize if they have aggro since they will probably be taking more damage soon)
Has Incoming Heal (lower priority if they already have an incoming heal from another healer)
Has PW Shield (lower priority if they have a power word shield on them)
Has WSG Flag (prioritize for flag carriers in wsg)
Has Nasty Debuff (if the unit has a certain debuff, it becomes a higher priority)
Has healing prevention debuff (don't prioritize)
Has high threat
Also, to avoid healers focusing their heals all on the same target, I took the class modifier idea from Squishy but modified it a little.
Priests focus on critical raid members:
Druids, Priests, Mages
Paladins & Shaman focus on raid members who typically take a lot of damage:
Warriors, Paladins, Shamans, Rogues
Druids focus on raid members who have a lot of health:
Paladins & Shaman
Warriors, Druids, Warlocks & Hunters
If group 2 has 3 healers and no tanks or melee, and group 5 has no healers but 3 rogues, then group 5 units will have a higher priority then g2 units. Basically the more healers a group has, the lower the priority, and the more tanks & melee units a group has, the higher the priority.
All credit should go to Maia for the code I borrowed from Squishy and Pastamancer and Maia for providing all the tools in Grid to be able to write this plugin.