Increasing CPU speed can be hazardous to your computer, so it's never something you should do on a whim. Your computer and its cooling system is designed to run the CPU at specific thresholds. Increasing the CPU's speed, also known as overclocking, also increases the amount of heat it generates. Your computer can easily overheat and shut down. In some cases, it can permanently damage your computer.
However, for short periods of time, or if the alternative is to trash a slow computer anyway, it may be worth giving a try. Note that the danger is higher with laptops, simply because they are smaller, more compact and don't have as much air flow inside as a larger computer has.