Does an MD make a difference to a PhD application in bioengineering? Does having an MD affect in any way, help or hurt, a PhD application to a top tier program (right after medical school and in the same field as the undergrad major--bioengineering, in my case)? Does doing or not doing a clinical residency matter to this either way?
I am in a PhD program and we have students who are 2 years into their MD who have transferred (not MSTP-MD/PHD) to complete a PhD before they finish medical school.

The main components most schools look at are:
(1) Test scores - whether they accept your MCAT depends on the program, but having a strong GRE score is a great start.
(2) Research experience - this is the biggest make or break. If you can show that you know how to do hands on research, and even if you have a publication or abstract presented at a national conference, that weighs a lot.
(3) Grades - obviously there is some weight on your ability to successfully complete rigorous classes.
(4) Letters of recommendation

Will it help or hurt? This depends on how well you currently stand in components 1-3 that I mentioned above. If you have a very low GRE score, it may hurt you regardless of your other degree. Alternatively, if you have a very high score, it may help you because it proves you've been successful previously in a tough program. 

The question you should be prepared for is why you want a PhD now that you have an MD. There are plenty of residency programs where you can have protected research time and gain experience in the lab. When interviewing, they will want to see that you have really considered dedicating another 4-6 years of your life to a PhD.

I do not think the residency matters, but I do not have experience with this. No students in my program have done residency yet.

Best of luck!