Wireless sensor network is one of the prospective methods for railway monitoring due to the long-term operation and low-maintenance performances. How to supply power to the wireless sensor nodes has drawn much attention recently. In railway monitoring, the idea of converting ambient vibration energy from vibration of railway track induced by passing trains to electric energy has made it a potential way for powering the wireless sensor nodes. Nowadays, most of vibration based energy harvesters are designed at resonance. However, as railway vibration frequency is a wide band range, how to design an energy harvester working at that range is critical. In this paper, the energy consumption of the wireless smart sensor platform, Imote2, at different working states were investigated. Based on the energy consumption, a design of a bimorph cantilever piezoelectric energy harvester has been optimized to generate maximum average power between a wide-band frequency range. Significant power and current outputs have been increased after optimal design. Finally, the rechargeable battery life for supplying the Imote2 for railway monitoring is predicted by using the optimized piezoelectric energy harvesting system.