What causes this green residue on pipe going into hot water tank?
It looks like the copper joint was not sweated properly and is leaking. You'll want to get the plumber to pull the coroded pipe (the green is what copper corosion looks like) and sweat a new pipe in there

If you want a DIY solution 


Shut the water off
get a pipe cutter and cut the pipe off just before the elbow
Buy some Sharkbite push connectors and replace the coroded section with PEX. Will probably run you about $20 (not including the cutter)


Make certain the PEX and connectors are the same diameter, and that your water heater is not putting out water above 180 degrees