This will vary from product to product. I would encourage you to seek out the terms and conditions on a case by case basis. This might involve e-mailing the company, but sometimes the information is already made publicly available.
For example, here's Apple's marketing guidelines for iPads, iPhones, and iPods:
The Apple product images of iPad, iPhone, and iPod touch can be used only to promote your app available on the App Store.
Feature only products for which your app is currently developed. Do
not use the iPhone 5s or iPhone 5c and iPod touch (5th generation)
product images if your app is not designed to display on the screen
size and resolution of these products. For example, do not feature
iPhone 5s unless your app displays at 326 pixels per inch at
1136-by-640 resolution. If you are promoting an app that is supported
only by previous product versions, send email to
firstname.lastname@example.org to request the correct product image.
- Always use the latest-generation Apple-provided product images.
- Do not display an Apple product with a blank screen.
- Do not display an Apple product on a cluttered background.
And here are Google's terms:
We ask that you put the following tagline beneath any image featuring
a Google product screenshot or data:
- Google and the Google logo are registered trademarks of Google Inc.,
used with permission.