If one of your squadmates jumps inside a nearby vehicle, you'll automatically repair him - albeit slowly - but without having to jump outside and use the repair tool. You'll not only receive team points for the repair, but this also gives you a healthy teammate.
This increases the chance that both of you will survive in a firefight. Better still, if your buddy is also an Engineer, you'll cross-repair each other continuously - one of the deadliest combinations in the game. Two Engineers traveling in twin formation allow you to defeat even the most skilled opponents with your combined firepower and perpetual regeneration.
Two engineers in the same vehicle can have much the same effect - except one (or both) of you needs to exit and repair manually. The trouble is, while you are outside, happily wrenching away, you make an awfully tempting target for snipers and infantry. Putting the vehicle between you and your enemy is the best answer when attacked, and simply circling the vehicle quickly or lying prone underneath while you repair is a good plan if you are unsure of the enemy's direction.
If you are being repaired by a teammate and engaging the enemy, it's important to try and remain still while they heal the damage. Running over your mechanic while he's trying to repair you is bad form, in addition to losing you team points.