How can I make walls move up and down with an animation.

I can make the animation in the unity animation tab, but I have multiple walls that I want to apply the animation to. How can I apply the same animation to multiple walls?

You have to save the animation somewhere in the assets folder.
So put an Animation component to all the walls and set the default animation to the one you created

either in inspector by dragging your animation into the component or if the walls are dynamically created you can do it in a script:

void SomeFunction()
{
   GameObject wall -- lets assume you have the wall object here

   Animation anim = wall.AddComponent<Animation>();
   anim.clip = Resources.Load("name") as AnimationClip;
   anim.Play(anim.clip.name);
}

In this case your animation needs to be in resources folder of course