The FIFA Rules of the game don't actively say anything about two-legged tackles. Tackles, in fact, are only mentioned twice in the rulebook.
First mention (Page 36, Law 12 - Fouls and Misconduct):
A direct free kick is awarded to the opposing team if a player commits any of the following seven offences in a manner considered by the referee to be careless, reckless or using excessive force:
- kicks or attempts to kick an opponent
- trips or attempts to trip an opponent
- jumps at an opponent
- charges at an opponent
- strikes or attempts to strike an opponent
- pushes an opponent
- tackles an opponent
Second mention (Page 126, Interpretation of the Laws of the Game, Law 12 - Fouls and Misconduct):
A tackle that endangers the safety of an opponent must be sanctioned as serious foul play.
Serious foul play is a sending-off (i.e. red card) offence.
As the wikipedia article says (at least now, Fillet's seems to say it was recently updated), a two-footed tackle is only penalized if it is careless, reckless or made with excessive force - the same language in the first rulebook citation above.
So a two-footed tackle itself is not illegal. It's only illegal if it is careless, reckless or made with excessive force. The reason why two-footed tackles are often punished is because they are more likely to be careless/reckless. The big danger is that you catch the other player's feet/ankles between your legs, which can easily lead to a sprain, twisted ankle, or (less easily, but most dangerous) broken ankle. For this reason, many players will tuck back one of their legs when attempting a slide tackle - both for a cleaner tackle and for the safety of the other player.
FIFA's Laws of the Game is linked below.
One note is that amateur leagues will play by mostly FIFA rules, but with some significant modifications. In some, slide tackles are not allowed at all. In others, two-legged tackles may be illegal. As pointed out in the comments, these are likely not true association football, as these are not standard rule modifications allowed by FIFA (without prior approval). However, many of these leagues are non-competitive anyway.