Shorts, T-shirts and ties are not worn in public. In private quite different though. It really depends on the destination and purpose of your trip. When dealing with government agencies, schools, embassies, and the like, obeying the rules is highly recommended.
Long trousers (no shorts!)
Avoid extreme short sleeve
Dress Code for Women in Iran
Head and hair must be covered. Wear long and loose pants and shirts (avoid leggings). There are some minimum requirements for female travellers dress-code in public places.
Head: Although hair must be covered. You can also use hats & caps together with a scarf.
Colour: There is no limitation to colours, we recommend light colours for summer.
Body: Body and arms should be covered by long and loose fitting clothes, including an overcoat or for summer a long shirt.
Legs & feet: Legs should be covered down to ankles. Sandals are no problem.
Note: In winter, apart from covering your head you can clothe exactly as you would do in your home country.
It is best to enter Iran with a scarf and a coat, or in summer – a long shirt.
On some international flights to Iran you need to respect the dress code rule as soon as the plane enters Iranian air space. Ask the flight attendants or watch what other people on the flight are doing.