Chris Dillow has a post comparing devaluation and tariffs. This raises some interesting points but misses what seem to me to be some of the most important distinctions.
First, tariffs raise revenue for the state that levies them. This transfer from private to public sector represents a form of fiscal tightening with a potentially contractionary impact on demand. To make a better comparison with the impact of devaluation, it is therefore useful to consider an imposition of tariffs combined with a reduction in general sales tax or value added tax, to the extent that the net tax take is unchanged.
This has the additional benefit that the overall price level for domestic sales is largely unchanged (ignoring any exchange rate movements that might result from the imposition of tariffs). Prices of imports (or goods with high imported content) rise, but prices of domestically produced goods fall.
This is the key benefit (to the nation that levies them) of tariffs. A devaluation raises the domestically denominated price of imported goods (generally by some fraction of the change in the exchange rate) and that of those foreign goods that compete with exports. The rise in import prices not only has a direct impact on the general price level, but firms using domestic inputs are also able to raise their sales prices. In the absence of any wage adjustment, this produces an immediate reduction in real wages and a drop in the wage share of national income.
What happens thereafter depends on the ability of labour to resist this erosion of the real wage. If they are able to secure nominal wage increases then this further increases domestic based prices. If this happens to a great enough extent, it may end up eliminating any impact of the devaluation on real price differences. In which case, the devaluation no longer has any impact.
This is why tariffs (specifically a general tariff) may work when a devaluation does not. It facilitates a favourable change in a nation's net export propensity without requiring a reduction in that nation's real wage level.
In some cases, this may be the only way that particular nation can expand. The problem is that it doesn't work if every nation imposes tariffs. So, if some nations have to compete by having low unit labour costs, they might object to the lucky nation that gets to avoid doing so. Particularly when it is a developed nation, with a relatively high standard of living.
However, nations often respond to a balance of payments constraint, not by devaluing, but by suppressing domestic demand, keeping the economy in a state of underemployment. This does nobody any good and in such cases, at least in principle, a programme of tariffs may offer an improvement even for those nations that are on the wrong end of them.