Arrhythmias can also be caused by certain substances or medications, such as caffeine, nicotine, alcohol, cocaine, inhaled aerosols, diet pills, and cough and cold remedies. Emotional states such as shock, fright or stress can also cause irregular heart rhythms.