How do I prevent my MacBook from sleeping when downloading apps from the App Store When I try to download large apps from the App Store whether on battery or AC power the displays turns off after time set and downloading also stops. 

The Energy Saver preferences are set to defaults. 

What should I do to continue download even when display is off? 

I am using OS X 10.9.4
If you don't want to install any software or change settings, you can use the Terminal utility caffeinate. Open Terminal (located in /Applications/Utilities/), type in caffeinate, and press return ↩︎.

If you want to set a timeout so it will go to sleep after some amount of time, use this:

caffeinate -t 3600


That will make it stay awake for an hour. (3600 is the number of seconds you want it to stay awake.)

To stop or cancel the caffeinate command, press ^ ControlC.