This explanation assumes you are trying to control both sets of lights at the same time and not independently.
If they are on the same circuit, having separate hot wires to each switch is really redundant. The return wires from the switches are not.
There is no problem ganging both lighting fixtures on the same switch so long as the switch is rated for the power the fixtures draw. Most modern dimmers are rated 150, 300, 600 or 1000 watts. You need to make sure that the two fixtures, added together, are somewhat lower than the switch rating. If not, your gonna need a bigger switch!
All you need to do is hook one of the hot lines to the switch and cap the other hot line with a wirenut. Then pigtail both of the two switched lines (that return to the fixtures) to the switch output side. Do be sure to attach ground, for safety and to reduce the chance of random hum.
All of this assumes that the dimmers are suitable to the type of lighting (special dimmers are needed for many CFL and LED bulbs), that they are single pole (not three way), and there is no special feature requiring a neutral.
SUPPLEMENT
As Tester101 needs to regularly remind me, current code calls for a neutral wire at all switches. You have an extra wire in the switch box (the redundant hot) that could be converted to a neutral if you ever need it. You would need to switch it over at the fixture to the neutral white line, mark it at the fixture to show it is neutral (e.g., with white tape) and mark it at the switch box as neutral (also white tape).
It sounds like the two black wire with the pigtail are the incoming hot and a branch hot to another location, such as the outlet. The other black attached to the switch is probably the switched hot that goes to the fixture being controlled.
You can verify this by turning the switch to off, making sure all the wires and terminals are clear and not touching anything else metal, and then turning on the breaker. Using the non-contact tester, carefully check the wires. The paired blacks should read hot, but the switched black should not.
If this is what you have, wiring the new switch is pretty straightforward. Turn the breaker off again. Confirm no wires are now hot. The new switch is basically connected the same way as the old, but with a neutral wire and ground wire added.
- The hot pigtail is connected to the line terminal.
- The switched black wire is connected to the load terminal.
- A pigtail (white) is added to the bundle of neutral wires and connected to the neutral terminal
- A pigtail (bare) is added to the bundle of ground wires and connected to the ground terminal.
The traveler terminal is not used (and it looks like it is covered anyway).
Use wire nuts, and if you like, tape over them for extra safety. You also could put a wrap of tape around the z-switch covering the terminals. Carefully insert the wires back in the box. Screw the switch into the box. Turn the power back on.
While most dumb switches do not need a neutral connection, many smart switches, such as the z-switch, do. Now all switches have a separate ground connection, although many in the past did not.
Best Answer
Short answer: in the switch box, the blacks go to the switch terminals (not the green one - that's for the bare ground) and the whites are spliced together with a wire nut or other connector.