Bed Bugs can easily live on clothing for up to three months if the bed bugs do not get any blood source.
In order for the bed bugs to survive longer than 3 months the bed bugs must get some blood by feeding on a blood source such as animals or humans.
So you can still have bed bugs on clothes for up to 3 months but if the clothes were in a closet and are hanging up in the closet then it's not likely that the clothes have bed bugs unless you've had the clothing laying on the bed or on the floor.
If in doubt though then it's best to wash the clothes to kill any potential bed bugs.
However sometimes bed bugs can go up to a year in colder temperatures without any blood source but most times the bed bugs will die within 3 to 6 months at most in warmer temperatures.
If you do have bed bugs I would highly recommend getting an exterminator in to kill the bed bugs although sometimes home remedies such as rubbing alcohol or tea tree oil that is diluted in some water can kill bed bugs.
You can dilute a bit of tea tree oil in some water and spray the tea tree oil onto the clothing or other objects that have bed bugs and it will kill the bed bugs and bed bug eggs.
But for a bed bug infestation an exterminator is highly recommended and well worth the cost.