Almost any action will affect a trader's reputation, whether it's selling rare merchandise or destroying an infamous pirate. Good reputation is required to create businesses outside your home town and to attain a higher social rank.
Local reputation will affect only a single town, while Hanse-wide bonuses will improve your reputation in all cities.
To prosper, every town needs to stock enough goods of all types. Traders that reliably sell adequate quantities of scarce commodities will be highly respected. This kind of reputation requires a steady supply of goods over time.
The needed weekly amount of goods can be seen in the Market Hall (consumption tab). The town should always have a stock of all goods that can last 1-2 weeks. This is especially important for Beer, Grain, Fish and Timber (also known as Big Four), which should be sold in adequate amounts regardless of price (if you want the town to grow and respect you, that is).
Supplying a town during a siege, famine or plague will result in additional reputation boost, if a trader manages to properly supply such a town despite the crisis.
Donating gold (local)
Donating gold for a church extension and jewelry, as well as answering miscellaneous requests (donations for art galleries, or shelters for poor people) will provide short and long-term reputation boosts in a town.
Hunting pirates (Hanse-wide)
Traders that destroy pirates and their hideouts are highly respected throughout the Hanse. The Side Room in the Tavern can provide a few volunteer pirates.
Fulfilling missions and contracts
Traders that can be trusted with important tasks will achieve local and Hanse-wide reputation bonuses. Such tasks can be accepted in the Tavern and in the Town Hall. Some of them have their own reputation requirements.
Constructing buildings (local)
Citizens will appreciate the hospitals, chapels, roads and wells that you build in their town (which provides a permanent reputation boost). Houses and businesses create job opportunities, that people will be grateful for as long as you don't raze them.
Organizing a celebration (local, short-term)
Celebrations will provide a reputation boost that will fade after a while. The number of guests depends on your current reputation, it can range from around 60-70% of population in a city where people generally like you, to the entire town population if the city is convinced about you.
For a successful celebration, the amount of food per 1000 guests should be as follows:
You may want to add a few barrels on top of that just in case.
Expeditions (Hanse-wide, long-term)
Discoveries of new trading opportunities and successful expeditions will be remembered.
Reputation can also be damaged. Avoid any of the following, unless you know that you can get away with it:
Buying scarce goods
Impounding posessions of a trader that cannot repay a loan
High interest rates when granting loans (very small penalty, feel free to ignore this)
Canceling a public convoy, when some traders have already joined it
Losing a siege or withdrawing gold from the Town Coffers (for a Lord Mayor)
Failing to fulfill contracts
Piracy and talking to underworld characters in the tavern
Not using the Bath House regularly
Not praying in the church
Ignoring important events that damage Hanseatic interests (for an Alderman)
A few of these activities are illegal or frowned upon. They may result in fines and ruin your reliability.