The former Scotland and Rangers defender has been out of work since leaving his Bramall Lane post in October and arrives at Griffin Park as a replacement for the departing duo of Alan Kernaghan and Peter Farrell.
Bees boss Warburton had been looking to add his own stamp to the club's backroom staff since taking over from Uwe Rosler last week and Weir's arrival as coach will do just that.
"I am delighted to have David join us. He had an outstanding playing career, working under some great coaches, and has a wealth of coaching experience," the new boss told getwestlondon.com.
"There will be an undoubted benefit for the staff and players to have someone of David's quality here with us.
"Peter and Alan have worked tirelessly over the past two seasons and have made an essential contribution to taking the club forward.
"Whilst we have spoken about continuity, it is equally as essential that I put my own fingerprint on the squad and the coaching staff."