Weir was dismissed as Blades boss after a poor start to the campaign, but has now agreed to become new Brentford chief Mark Warburton's assistant after he replaced Wigan-bound Uwe Rosler.
The Griffin Park gaffer said: "I am delighted to have David join us at Brentford Football Club.
"He had an outstanding playing career, working under some great coaches, and has a wealth of coaching experience.
"There will be an undoubted benefit for the staff and players to have someone of David's quality here with us.
"In conversations with David, he recognises the progress that has been made at Brentford and is excited to join us.
"The players and staff are in good shape, it is a great time to be welcoming David to Brentford.
"I am looking forward to working with him."