Why was there a split into two kingdoms?

Solomon and the people sinned, punishment was a foolish ruler, Rehoboam, whose folly led to the split. When did the two kingdoms fall? North fell in 621; south in 597 & 587.