i would say, in formal ways, きのうは なにをしましたか?or きのうは なにをしたんですか? but if you wanna say it to your friends, more casual to say is きのう なにしてたのー? きのう なにやってたー?. well, you might find it like," what were you doing yesterday?" but, to Japanese speakers(i mean to your friends), it sounds more natural to hear than きのうは なにをしましたか?, i guess :) good luck! :D