Various technologies for harvesting energy have emerged to substitute the conventional energy sources. The environmental issues, such as global warming, greenhouse effect and others, associated with non-renewable energy sources have instigated the development of technologies to harness power from vibration, solar, and thermal energy. The energy can be converted to power using small electronic devices. Vibration is a common energy source in our surroundings and can be transformed into electrical energy using different transduction mechanisms: electrostatic, electromagnetic, piezoelectric, and triboelectric generators. A piezoelectric nanogenerator (PENG) and triboelectric nanogenerator (TENG) are two electrical power harvesting devices for converting the vibration from the surrounding to electrical energy. Several eco-friendly and biocompatible components have been employed in the fabrication of the PENG and TENG for multiple application including chemical sensors, pressure sensors, and biomedical appliances. This review elaborates the application of different smart materials as the TENG and PENG for the conversion of mechanical or vibrational energy to electrical energy for varied applications.