"I climbed a mountain yesterday."
From ni is used on a place, it indicates a direction. で is for the place of an action. When the action involves moving up, along, or into something, ni is usually the particle behind it. So に indicates that the mountain easn't just the place where climbing happened, but the thing that was climbed.